mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-08 13:28:25 +08:00

committed by
techknowlogick

parent
3d91bb2f2d
commit
ecefa9e724
3
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
3
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user