mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
update code.gitea.io/git (#450)
This commit is contained in:
committed by
Thomas Boerger
parent
0c5c34d7dd
commit
47a7529d96
6
vendor/code.gitea.io/git/error.go
generated
vendored
6
vendor/code.gitea.io/git/error.go
generated
vendored
@ -9,10 +9,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// ErrExecTimeout error when exec timed out
|
||||
type ErrExecTimeout struct {
|
||||
Duration time.Duration
|
||||
}
|
||||
|
||||
// IsErrExecTimeout if some error is ErrExecTimeout
|
||||
func IsErrExecTimeout(err error) bool {
|
||||
_, ok := err.(ErrExecTimeout)
|
||||
return ok
|
||||
@ -22,11 +24,13 @@ func (err ErrExecTimeout) Error() string {
|
||||
return fmt.Sprintf("execution is timeout [duration: %v]", err.Duration)
|
||||
}
|
||||
|
||||
// ErrNotExist commit not exist error
|
||||
type ErrNotExist struct {
|
||||
ID string
|
||||
RelPath string
|
||||
}
|
||||
|
||||
// IsErrNotExist if some error is ErrNotExist
|
||||
func IsErrNotExist(err error) bool {
|
||||
_, ok := err.(ErrNotExist)
|
||||
return ok
|
||||
@ -36,10 +40,12 @@ func (err ErrNotExist) Error() string {
|
||||
return fmt.Sprintf("object does not exist [id: %s, rel_path: %s]", err.ID, err.RelPath)
|
||||
}
|
||||
|
||||
// ErrUnsupportedVersion error when required git version not matched
|
||||
type ErrUnsupportedVersion struct {
|
||||
Required string
|
||||
}
|
||||
|
||||
// IsErrUnsupportedVersion if some error is ErrUnsupportedVersion
|
||||
func IsErrUnsupportedVersion(err error) bool {
|
||||
_, ok := err.(ErrUnsupportedVersion)
|
||||
return ok
|
||||
|
Reference in New Issue
Block a user