aboutsummaryrefslogtreecommitdiff
path: root/bpkg/fetch-git.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-02 00:26:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-02 00:26:35 +0300
commit2b3ee000c596ff27d24415cb498e1fc3439d2249 (patch)
tree5e8ff254818e65321bc853c95797946248d26c7e /bpkg/fetch-git.cxx
parent0086b0546831bcd70814bd732c1aad9ecfc38d3b (diff)
Fix minimum supported git version raising it to 2.14.0 from 2.12.0
Prior to 2.14.0 the git-fetch command doesn't accept commit id as a refspec which we rely upon.
Diffstat (limited to 'bpkg/fetch-git.cxx')
-rw-r--r--bpkg/fetch-git.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx
index cd5d597..20bad96 100644
--- a/bpkg/fetch-git.cxx
+++ b/bpkg/fetch-git.cxx
@@ -74,10 +74,16 @@ namespace bpkg
static string
git_line (const common_options&, const char* what, A&&... args);
- // Start git process. On the first call check that git version is 2.12.0 or
+ // Start git process. On the first call check that git version is 2.14.0 or
// above, and fail if that's not the case.
//
- // Note that git is executed in the "sanitized" environment, having the
+ // Note that prior to 2.14.0 the git-fetch command doesn't accept commit id
+ // as a refspec:
+ //
+ // $ git fetch --no-recurse-submodules --depth 1 origin 5e8245ee3526530a3467f59b0601bbffb614f45b
+ // error: Server does not allow request for unadvertised object 5e8245ee3526530a3467f59b0601bbffb614f45b
+ //
+ // Also note that git is executed in the "sanitized" environment, having the
// environment variables that are local to the repository being unset (all
// except GIT_CONFIG_PARAMETERS). We do the same as the git-submodule script
// does for commands executed for submodules. Though we do it for all
@@ -118,9 +124,9 @@ namespace bpkg
info << "produced by '" << co.git () << "'; "
<< "use --git to override" << endg;
- if (*v < semantic_version {2, 12, 0})
+ if (*v < semantic_version {2, 14, 0})
fail << "unsupported git version " << *v <<
- info << "minimum supported version is 2.12.0" << endf;
+ info << "minimum supported version is 2.14.0" << endf;
// Sanitize the environment.
//