aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vendor/github.com/gogs/git-module/commit.go5
-rw-r--r--vendor/github.com/gogs/git-module/git.go2
-rw-r--r--vendor/github.com/gogs/git-module/repo.go15
-rw-r--r--vendor/github.com/gogs/git-module/repo_commit.go32
-rw-r--r--vendor/vendor.json8
5 files changed, 40 insertions, 22 deletions
diff --git a/vendor/github.com/gogs/git-module/commit.go b/vendor/github.com/gogs/git-module/commit.go
index 64831d7f..cab9f464 100644
--- a/vendor/github.com/gogs/git-module/commit.go
+++ b/vendor/github.com/gogs/git-module/commit.go
@@ -163,11 +163,6 @@ func commitsCount(repoPath, revision, relpath string) (int64, error) {
return strconv.ParseInt(strings.TrimSpace(stdout), 10, 64)
}
-// CommitsCount returns number of total commits of until given revision.
-func CommitsCount(repoPath, revision string) (int64, error) {
- return commitsCount(repoPath, revision, "")
-}
-
func (c *Commit) CommitsCount() (int64, error) {
return CommitsCount(c.repo.Path, c.ID.String())
}
diff --git a/vendor/github.com/gogs/git-module/git.go b/vendor/github.com/gogs/git-module/git.go
index 414d67cd..1b2628e9 100644
--- a/vendor/github.com/gogs/git-module/git.go
+++ b/vendor/github.com/gogs/git-module/git.go
@@ -10,7 +10,7 @@ import (
"time"
)
-const _VERSION = "0.6.4"
+const _VERSION = "0.6.5"
func Version() string {
return _VERSION
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))
-}
diff --git a/vendor/github.com/gogs/git-module/repo_commit.go b/vendor/github.com/gogs/git-module/repo_commit.go
index 6b629d4d..1ac03387 100644
--- a/vendor/github.com/gogs/git-module/repo_commit.go
+++ b/vendor/github.com/gogs/git-module/repo_commit.go
@@ -10,6 +10,7 @@ import (
"fmt"
"strconv"
"strings"
+ "time"
"github.com/mcuadros/go-version"
)
@@ -379,3 +380,34 @@ func (repo *Repository) getCommitsBeforeLimit(id sha1, num int) (*list.List, err
l := list.New()
return l, repo.commitsBefore(l, nil, id, 1, num)
}
+
+// CommitsAfterDate returns a list of commits which committed after given date.
+// The format of date should be in RFC3339.
+func (repo *Repository) CommitsAfterDate(date string) (*list.List, error) {
+ stdout, err := NewCommand("log", _PRETTY_LOG_FORMAT, "--since="+date).RunInDirBytes(repo.Path)
+ if err != nil {
+ return nil, err
+ }
+
+ return repo.parsePrettyFormatLogToList(stdout)
+}
+
+// CommitsCount returns number of total commits of until given revision.
+func CommitsCount(repoPath, revision string) (int64, error) {
+ return commitsCount(repoPath, revision, "")
+}
+
+// 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))
+}
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 1c50d88f..cc2c9824 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -207,6 +207,12 @@
"revisionTime": "2017-03-01T03:54:11Z"
},
{
+ "checksumSHA1": "KNGYbPsHRTay+Mo08T0eWwqeOb4=",
+ "path": "github.com/gogs/git-module",
+ "revision": "483e6638258058b08679cf0c7010a13597de4978",
+ "revisionTime": "2018-05-27T13:41:17Z"
+ },
+ {
"checksumSHA1": "MLO0PyrK2MUO6A7Z9PxWuu43C/A=",
"path": "github.com/issue9/identicon",
"revision": "d36b54562f4cf70c83653e13dc95c220c79ef521",
@@ -609,5 +615,5 @@
"revisionTime": "2014-12-09T11:07:59Z"
}
],
- "rootPath": "github.com/gogits/gogs"
+ "rootPath": "github.com/gogs/gogs"
}