Updates vendor/code.gitea.io/git (#6286)

release/v1.15
Richard Mahn 2019-03-11 12:01:00 -06:00 committed by techknowlogick
parent 7c205607b5
commit 50631b5ac3
2 changed files with 12 additions and 4 deletions

7
Gopkg.lock generated
View File

@ -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",
]

View File

@ -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 {