error.go 532 B

12345678910111213141516171819
  1. // Copyright 2020 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package gitutil
  5. import (
  6. "github.com/gogs/git-module"
  7. )
  8. // IsErrRevisionNotExist returns true if the error is git.ErrRevisionNotExist.
  9. func IsErrRevisionNotExist(err error) bool {
  10. return err == git.ErrRevisionNotExist
  11. }
  12. // IsErrNoMergeBase returns true if the error is git.ErrNoMergeBase.
  13. func IsErrNoMergeBase(err error) bool {
  14. return err == git.ErrNoMergeBase
  15. }