aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/git/repo_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/git/repo_commit.go')
-rw-r--r--vendor/code.gitea.io/git/repo_commit.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/git/repo_commit.go b/vendor/code.gitea.io/git/repo_commit.go
index d5cab8f873..484568585f 100644
--- a/vendor/code.gitea.io/git/repo_commit.go
+++ b/vendor/code.gitea.io/git/repo_commit.go
@@ -140,6 +140,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(), "unknown revision or path") {
+ return nil, ErrNotExist{commitID, ""}
+ }
return nil, err
}
}