aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-04-28 22:20:58 +0800
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-28 16:20:58 +0200
commit91d64656a46848f1dceacbdf7f03677cd83d5aa0 (patch)
tree68818af318d82122a62fd81312e6bc59e015c60f /vendor/code.gitea.io
parent18f46fd7cfd5068adcb900828e814d415cb235a5 (diff)
downloadgitea-91d64656a46848f1dceacbdf7f03677cd83d5aa0.tar.gz
gitea-91d64656a46848f1dceacbdf7f03677cd83d5aa0.zip
update git which fixes #1133 (#1614)
Diffstat (limited to 'vendor/code.gitea.io')
-rw-r--r--vendor/code.gitea.io/git/git.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/code.gitea.io/git/git.go b/vendor/code.gitea.io/git/git.go
index 2cea1dc1d5..9ec20c97e1 100644
--- a/vendor/code.gitea.io/git/git.go
+++ b/vendor/code.gitea.io/git/git.go
@@ -1,4 +1,5 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
+// Copyright 2017 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
@@ -8,6 +9,8 @@ import (
"fmt"
"strings"
"time"
+
+ "github.com/mcuadros/go-version"
)
// Version return this package's current version
@@ -21,6 +24,8 @@ var (
Debug = false
// Prefix the log prefix
Prefix = "[git-module] "
+ // GitVersionRequired is the minimum Git version required
+ GitVersionRequired = "1.8.1.6"
)
func log(format string, args ...interface{}) {
@@ -66,7 +71,13 @@ func BinVersion() (string, error) {
}
func init() {
- BinVersion()
+ gitVersion, err := BinVersion()
+ if err != nil {
+ panic(fmt.Sprintf("Git version missing: %v", err))
+ }
+ if version.Compare(gitVersion, GitVersionRequired, "<") {
+ panic(fmt.Sprintf("Git version not supported. Requires version > %v", GitVersionRequired))
+ }
}
// Fsck verifies the connectivity and validity of the objects in the database