aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogs/git-module/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-05-27 21:43:24 +0800
committerUnknwon <u@gogs.io>2018-05-29 06:43:19 +0800
commit702acc06d8a6346aecc9abd9ce1b7f2da7f49e42 (patch)
tree06c869934a610ced15a6ac890506528ccf26e167 /vendor/github.com/gogs/git-module/repo.go
parentb5a1daa756b181f15a1318a53aba09478b988e6a (diff)
vendor: update github.com/gogs/git-module
Diffstat (limited to 'vendor/github.com/gogs/git-module/repo.go')
-rw-r--r--vendor/github.com/gogs/git-module/repo.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/vendor/github.com/gogs/git-module/repo.go b/vendor/github.com/gogs/git-module/repo.go
index ca4805f5..aef9f385 100644
--- a/vendor/github.com/gogs/git-module/repo.go
+++ b/vendor/github.com/gogs/git-module/repo.go
@@ -278,18 +278,3 @@ func GetRepoSize(repoPath string) (*CountObject, error) {
return countObject, nil
}
-
-// GetLatestCommitDate returns the date of latest commit of repository.
-// If branch is empty, it returns the latest commit across all branches.
-func GetLatestCommitDate(repoPath, branch string) (time.Time, error) {
- cmd := NewCommand("for-each-ref", "--count=1", "--sort=-committerdate", "--format=%(committerdate:iso8601)")
- if len(branch) > 0 {
- cmd.AddArguments("refs/heads/" + branch)
- }
- stdout, err := cmd.RunInDir(repoPath)
- if err != nil {
- return time.Time{}, err
- }
-
- return time.Parse("2006-01-02 15:04:05 -0700", strings.TrimSpace(stdout))
-}