diff options
author | Unknwon <u@gogs.io> | 2017-06-05 00:10:53 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-06-05 00:10:53 -0400 |
commit | 36d6450977e40d8ea994590e3c9fd60184fe93e4 (patch) | |
tree | 411da811a540a8e6709a770ce392b9d5c58b54a8 /vendor/github.com/gogits/git-module/error.go | |
parent | 02a576a6a0ce6522b7b6af70bc2eea2de3f534d6 (diff) |
repo/pull: detect case when no merge base found (#4434)
Diffstat (limited to 'vendor/github.com/gogits/git-module/error.go')
-rw-r--r-- | vendor/github.com/gogits/git-module/error.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/gogits/git-module/error.go b/vendor/github.com/gogits/git-module/error.go index 848bfba1..2fefaa1e 100644 --- a/vendor/github.com/gogits/git-module/error.go +++ b/vendor/github.com/gogits/git-module/error.go @@ -48,3 +48,14 @@ func IsErrUnsupportedVersion(err error) bool { func (err ErrUnsupportedVersion) Error() string { return fmt.Sprintf("Operation requires higher version [required: %s]", err.Required) } + +type ErrNoMergeBase struct{} + +func IsErrNoMergeBase(err error) bool { + _, ok := err.(ErrNoMergeBase) + return ok +} + +func (err ErrNoMergeBase) Error() string { + return "no merge based found" +} |