diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-07-16 10:43:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 10:43:34 +0200 |
commit | 400b083e49c5328776359e0df495f98b01efbf63 (patch) | |
tree | 55bc8737682b853f2fc17f280bb19b553933b6ca /plumbing/transport/internal/common/common.go | |
parent | 3bd5e82b2512d85becae9677fa06b5a973fd4cfb (diff) | |
parent | 54d8c38fd63feefe6c25c1ac2945a6fc0bc7f16a (diff) | |
download | go-git-400b083e49c5328776359e0df495f98b01efbf63.tar.gz |
Merge pull request #888 from jeromedoucet/tech/add_gog_repository_not_found
plumbing/transport/internal: common, support Gogs for ErrRepositoryNotFound
Diffstat (limited to 'plumbing/transport/internal/common/common.go')
-rw-r--r-- | plumbing/transport/internal/common/common.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go index 8ec1ea5..00497f3 100644 --- a/plumbing/transport/internal/common/common.go +++ b/plumbing/transport/internal/common/common.go @@ -382,6 +382,7 @@ var ( gitProtocolNotFoundErr = "ERR \n Repository not found." gitProtocolNoSuchErr = "ERR no such repository" gitProtocolAccessDeniedErr = "ERR access denied" + gogsAccessDeniedErr = "Gogs: Repository does not exist or you do not have access" ) func isRepoNotFoundError(s string) bool { @@ -409,6 +410,10 @@ func isRepoNotFoundError(s string) bool { return true } + if strings.HasPrefix(s, gogsAccessDeniedErr) { + return true + } + return false } |