aboutsummaryrefslogtreecommitdiff
path: root/internal/gitutil
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-03-10 22:15:55 +0800
committerGitHub <noreply@github.com>2020-03-10 22:15:55 +0800
commit880d0ec19f488001a90b3e370a992eaabac89e70 (patch)
tree97bcb926b3c94f56cc0367a7a405df1a2d6ad06a /internal/gitutil
parent2430612ad4190fe81bfb8b64c92fe1883188f856 (diff)
api: overhaul `/repos/owner/repos/contents` (#5980)
* Fix import path renaming * api: overhaul /repos/owner/repos/contents
Diffstat (limited to 'internal/gitutil')
-rw-r--r--internal/gitutil/error.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/gitutil/error.go b/internal/gitutil/error.go
index 08575ec3..d8023f94 100644
--- a/internal/gitutil/error.go
+++ b/internal/gitutil/error.go
@@ -17,3 +17,8 @@ func IsErrRevisionNotExist(err error) bool {
func IsErrNoMergeBase(err error) bool {
return err == git.ErrNoMergeBase
}
+
+// IsErrSubmoduleNotExist returns true if the error is git.ErrSubmoduleNotExist.
+func IsErrSubmoduleNotExist(err error) bool {
+ return err == git.ErrSubmoduleNotExist
+}