diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-03-11 12:01:00 -0600 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-03-11 14:01:00 -0400 |
commit | 50631b5ac3ea06e167eca42c564ff4d89568ae99 (patch) | |
tree | 8a809b110af079118a5d5ed39e6ae5b3dd3851e1 | |
parent | 7c205607b5c3fa6e2cf91769588263a5c94e361a (diff) | |
download | gitea-50631b5ac3ea06e167eca42c564ff4d89568ae99.tar.gz gitea-50631b5ac3ea06e167eca42c564ff4d89568ae99.zip |
Updates vendor/code.gitea.io/git (#6286)
-rw-r--r-- | Gopkg.lock | 7 | ||||
-rw-r--r-- | vendor/code.gitea.io/git/repo_commit.go | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Gopkg.lock b/Gopkg.lock index dae99b340f..6a97f8915c 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,11 +3,11 @@ [[projects]] branch = "master" - digest = "1:0f0ada42a7b1bd64794bf8fea917c2cd626d6b0539173e3704cd764b93eb5312" + digest = "1:e1fa64238b0a2dbf1edf98c4af8d1b8cb65179e286d7f28006b50fa9f508ee9d" name = "code.gitea.io/git" packages = ["."] pruneopts = "NUT" - revision = "8983773ac6fef49203e7ee8cdbfde3e118bc3421" + revision = "74d7c14dd4a3ed9c5def0dc3c1aeede399ddc5c5" [[projects]] branch = "master" @@ -1331,6 +1331,9 @@ "gopkg.in/ini.v1", "gopkg.in/ldap.v3", "gopkg.in/macaron.v1", + "gopkg.in/src-d/go-git.v4", + "gopkg.in/src-d/go-git.v4/config", + "gopkg.in/src-d/go-git.v4/plumbing", "gopkg.in/testfixtures.v2", "strk.kbt.io/projects/go/libravatar", ] diff --git a/vendor/code.gitea.io/git/repo_commit.go b/vendor/code.gitea.io/git/repo_commit.go index fbb8f97a1d..2d9f5bdbf8 100644 --- a/vendor/code.gitea.io/git/repo_commit.go +++ b/vendor/code.gitea.io/git/repo_commit.go @@ -101,7 +101,11 @@ l: sig, err := newGPGSignatureFromCommitline(data, (nextline+1)+sigindex, true) if err == nil && sig != nil { // remove signature from commit message - cm = cm[:sigindex-1] + if sigindex == 0 { + cm = "" + } else { + cm = cm[:sigindex-1] + } commit.Signature = sig } } @@ -153,13 +157,14 @@ func (repo *Repository) getCommit(id SHA1) (*Commit, error) { func (repo *Repository) GetCommit(commitID string) (*Commit, error) { if len(commitID) != 40 { var err error - commitID, err = NewCommand("rev-parse", commitID).RunInDir(repo.Path) + actualCommitID, err := NewCommand("rev-parse", commitID).RunInDir(repo.Path) if err != nil { if strings.Contains(err.Error(), "unknown revision or path") { return nil, ErrNotExist{commitID, ""} } return nil, err } + commitID = actualCommitID } id, err := NewIDFromString(commitID) if err != nil { |