瀏覽代碼

vendor: update github.com/gogits/git-module

Unknwon 7 年之前
父節點
當前提交
c07899701a
共有 4 個文件被更改,包括 5 次插入15 次删除
  1. 1 6
      models/repo.go
  2. 1 1
      vendor/github.com/gogits/git-module/README.md
  3. 0 5
      vendor/github.com/gogits/git-module/repo.go
  4. 3 3
      vendor/vendor.json

+ 1 - 6
models/repo.go

@@ -335,12 +335,7 @@ func (repo *Repository) mustOwner(e Engine) *User {
 func (repo *Repository) UpdateSize() error {
 	countObject, err := git.GetRepoSize(repo.RepoPath())
 	if err != nil {
-		if !git.IsErrUnsupportedVersion(err) {
-			return fmt.Errorf("GetRepoSize: %v", err)
-		}
-
-		log.Warn("Get repository size is not supported by the Git version on server")
-		return nil
+		return fmt.Errorf("GetRepoSize: %v", err)
 	}
 
 	repo.Size = countObject.Size + countObject.SizePack

+ 1 - 1
vendor/github.com/gogits/git-module/README.md

@@ -5,7 +5,7 @@ Package git-module is a Go module for Git access through shell commands.
 ## Limitations
 
 - Go version must be at least **1.4**.
-- Git version must be no less than **1.7.1**, and greater than or equal to **1.8.0** is recommended.
+- Git version must be no less than **1.7.1**, and greater than or equal to **1.8.3** is recommended.
 - For Windows users, try use as new a version as possible.
 
 ## License

+ 0 - 5
vendor/github.com/gogits/git-module/repo.go

@@ -15,7 +15,6 @@ import (
 	"time"
 
 	"github.com/Unknwon/com"
-	"github.com/mcuadros/go-version"
 )
 
 // Repository represents a Git repository.
@@ -249,10 +248,6 @@ const (
 
 // GetRepoSize returns disk usage report of repository in given path.
 func GetRepoSize(repoPath string) (*CountObject, error) {
-	if version.Compare(gitVersion, "1.8.3", "<") {
-		return nil, ErrUnsupportedVersion{"1.8.3"}
-	}
-
 	cmd := NewCommand("count-objects", "-v")
 	stdout, err := cmd.RunInDir(repoPath)
 	if err != nil {

+ 3 - 3
vendor/vendor.json

@@ -159,10 +159,10 @@
 			"revisionTime": "2016-08-10T03:50:02Z"
 		},
 		{
-			"checksumSHA1": "b7QGk00tV65zoJ2LxNOv+/ShNb0=",
+			"checksumSHA1": "WVDLV+YcA77fg1kgddSinycf3Do=",
 			"path": "github.com/gogits/git-module",
-			"revision": "187ba03b3c392ed6e6af3985f0bad0c2120219ca",
-			"revisionTime": "2017-04-01T21:46:49Z"
+			"revision": "f4026b57acf35d799d5dec95066f3a10c572604e",
+			"revisionTime": "2017-04-03T19:07:43Z"
 		},
 		{
 			"checksumSHA1": "D2kVXl0QpIw6t3891Sl7IM9wL+w=",