aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_commit.go')
-rw-r--r--modules/git/repo_commit.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go
index d20c6540eb..618b89438c 100644
--- a/modules/git/repo_commit.go
+++ b/modules/git/repo_commit.go
@@ -21,6 +21,11 @@ import (
func (repo *Repository) GetRefCommitID(name string) (string, error) {
ref, err := repo.gogitRepo.Reference(plumbing.ReferenceName(name), true)
if err != nil {
+ if err == plumbing.ErrReferenceNotFound {
+ return "", ErrNotExist{
+ ID: name,
+ }
+ }
return "", err
}