diff options
Diffstat (limited to 'modules/git/error.go')
-rw-r--r-- | modules/git/error.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/git/error.go b/modules/git/error.go index 387dd724e5..40c4106414 100644 --- a/modules/git/error.go +++ b/modules/git/error.go @@ -8,6 +8,8 @@ import ( "fmt" "strings" "time" + + "code.gitea.io/gitea/modules/util" ) // ErrExecTimeout error when exec timed out @@ -41,6 +43,10 @@ func (err ErrNotExist) Error() string { return fmt.Sprintf("object does not exist [id: %s, rel_path: %s]", err.ID, err.RelPath) } +func (err ErrNotExist) Unwrap() error { + return util.ErrNotExist +} + // ErrBadLink entry.FollowLink error type ErrBadLink struct { Name string @@ -87,6 +93,10 @@ func (err ErrBranchNotExist) Error() string { return fmt.Sprintf("branch does not exist [name: %s]", err.Name) } +func (err ErrBranchNotExist) Unwrap() error { + return util.ErrNotExist +} + // ErrPushOutOfDate represents an error if merging fails due to unrelated histories type ErrPushOutOfDate struct { StdOut string |