repo/pull: detect case when no merge base found (#4434)

This commit is contained in:
Unknwon
2017-06-05 00:10:53 -04:00
parent 02a576a6a0
commit 36d6450977
11 changed files with 94 additions and 67 deletions

View File

@@ -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"
}