diff --git a/models/repo.go b/models/repo.go index e0bac8168..b12ed58e2 100644 --- a/models/repo.go +++ b/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 diff --git a/vendor/github.com/gogits/git-module/README.md b/vendor/github.com/gogits/git-module/README.md index 9dedf5a98..f9569ceb3 100644 --- a/vendor/github.com/gogits/git-module/README.md +++ b/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 diff --git a/vendor/github.com/gogits/git-module/repo.go b/vendor/github.com/gogits/git-module/repo.go index 02f264c12..aef9f385b 100644 --- a/vendor/github.com/gogits/git-module/repo.go +++ b/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 { diff --git a/vendor/vendor.json b/vendor/vendor.json index 54047ebe3..6e778e6aa 100644 --- a/vendor/vendor.json +++ b/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=",