aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/gogits/git-module/repo_commit.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/gogits/git-module/repo_commit.go b/vendor/github.com/gogits/git-module/repo_commit.go
index 78ff0409..34349c68 100644
--- a/vendor/github.com/gogits/git-module/repo_commit.go
+++ b/vendor/github.com/gogits/git-module/repo_commit.go
@@ -106,7 +106,7 @@ func (repo *Repository) getCommit(id sha1) (*Commit, error) {
data, err := NewCommand("cat-file", "-p", id.String()).RunInDirBytes(repo.Path)
if err != nil {
- if strings.Contains(err.Error(), "fatal: Not a valid object name") {
+ if strings.Contains(err.Error(), "exit status 128") {
return nil, ErrNotExist{id.String(), ""}
}
return nil, err
@@ -129,6 +129,9 @@ func (repo *Repository) GetCommit(commitID string) (*Commit, error) {
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
}
}