Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2019-07-16 16:03:07 +0300
committerJacob Vosmaer <jacob@gitlab.com>2019-07-16 16:03:07 +0300
commitb52d9ceab4603724b748f4911e2ad77e6501b5a0 (patch)
tree97951a029c9a2ae231927d3b7dcbbc1c4f5401a4 /internal/git
parent313a4cb5bd6d3b7f9927e3fcb5f60d4dd050e1d4 (diff)
parent0dd443615adf3b11c27b421edf350b141e2307c7 (diff)
Merge branch 'zj-bump-git-version-test-matrix' into 'master'
Add Git 2.22 to the test pipeline See merge request gitlab-org/gitaly!1359
Diffstat (limited to 'internal/git')
-rw-r--r--internal/git/proto.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/git/proto.go b/internal/git/proto.go
index dfe112311..5244e6bdb 100644
--- a/internal/git/proto.go
+++ b/internal/git/proto.go
@@ -148,6 +148,19 @@ func SupportsDeltaIslands(versionStr string) (bool, error) {
return !versionLessThan(v, version{2, 20, 0}), nil
}
+// NoMissingWantErrMessage checks if the git version is before Git 2.22,
+// in which versions the missing objects in the wants didn't yield an explicit
+// error message, but no ouput at all.
+func NoMissingWantErrMessage() bool {
+ ver, err := Version()
+ if err != nil {
+ return false
+ }
+
+ lt, err := VersionLessThan(ver, "2.22.0")
+ return err == nil && lt
+}
+
// BuildGitOptions helps to generate options to the git command.
// If gitOpts is not empty then its values are passed as part of
// the "-c" option of the git command, the other values are passed along with the subcommand.