From f5fb552b85e14209a4ee3220b3bdfbcdec0d14bf Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 15 Feb 2018 20:39:14 +0300 Subject: Raise minimum supported git version to 2.11.0 from 2.1.4 --- bpkg/fetch-git.cxx | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'bpkg/fetch-git.cxx') diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx index 6cd5d6e..3dbb4eb 100644 --- a/bpkg/fetch-git.cxx +++ b/bpkg/fetch-git.cxx @@ -99,7 +99,7 @@ namespace bpkg static string git_string (const common_options&, const char* what, A&&... args); - // Start git process. On the first call check that git version is 2.1.4 or + // Start git process. On the first call check that git version is 2.11.0 or // above, and fail if that's not the case. // // Note that git is executed in the "sanitized" environment, having the @@ -169,34 +169,12 @@ namespace bpkg if (v.empty ()) fail << "unable to obtain git version from '" << s << "'" << endg; - if (v.version < 20010040000) + if (v.version < 20110000000) fail << "unsupported git version " << v.string () << - info << "minimum supported version is 2.1.4" << endf; + info << "minimum supported version is 2.11.0" << endf; // Sanitize the environment. // - // Prio to 2.8.2 git required to run the rev-parse command in a - // repository directory and failed otherwise. For these versions we - // will use a precomputed (with 2.8.1) list of variables. - // - if (v.version < 20080020000) - { - unset_vars = strings ({"GIT_ALTERNATE_OBJECT_DIRECTORIES", - "GIT_CONFIG", - "GIT_OBJECT_DIRECTORY", - "GIT_DIR", - "GIT_WORK_TREE", - "GIT_IMPLICIT_WORK_TREE", - "GIT_GRAFT_FILE", - "GIT_INDEX_FILE", - "GIT_NO_REPLACE_OBJECTS", - "GIT_REPLACE_REF_BASE", - "GIT_PREFIX", - "GIT_SHALLOW_FILE", - "GIT_COMMON_DIR"}); - break; - } - fdpipe pipe (open_pipe ()); // We assume that non-sanitized git environment can't harm this call. -- cgit v1.1