From 20637689e489758b36d46e2409e20eb4fa703e73 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 12 Jun 2017 11:26:27 +0200 Subject: plumbing/transport: detect git protocol "no such repository" error --- plumbing/transport/internal/common/common.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go index 7001d05..41be776 100644 --- a/plumbing/transport/internal/common/common.go +++ b/plumbing/transport/internal/common/common.go @@ -337,6 +337,7 @@ var ( bitbucketRepoNotFoundErr = "conq: repository does not exist." localRepoNotFoundErr = "does not appear to be a git repository" gitProtocolNotFoundErr = "ERR \n Repository not found." + gitProtocolNoSuchErr = "ERR no such repository" ) func isRepoNotFoundError(s string) bool { @@ -356,6 +357,10 @@ func isRepoNotFoundError(s string) bool { return true } + if strings.HasPrefix(s, gitProtocolNoSuchErr) { + return true + } + return false } -- cgit