vendor: update github.com/gogs/git-module

This commit is contained in:
Unknwon
2018-06-03 20:26:29 +08:00
parent 0376e59520
commit 8d091ec062
4 changed files with 24 additions and 13 deletions

View File

@@ -126,15 +126,10 @@ func (repo *Repository) getCommit(id sha1) (*Commit, error) {
// GetCommit returns commit object of by ID string.
func (repo *Repository) GetCommit(commitID string) (*Commit, error) {
if len(commitID) != 40 {
var err error
commitID, err = NewCommand("rev-parse", commitID).RunInDir(repo.Path)
if err != nil {
if strings.Contains(err.Error(), "exit status 128") {
return nil, ErrNotExist{commitID, ""}
}
return nil, err
}
var err error
commitID, err = GetFullCommitID(repo.Path, commitID)
if err != nil {
return nil, fmt.Errorf("GetCommitFullID: %v", err)
}
id, err := NewIDFromString(commitID)
if err != nil {