From 63c55aa0390e4eb89ac83c29e181d81562dd8a6b Mon Sep 17 00:00:00 2001 From: Denis Isaev Date: Mon, 8 Jul 2019 17:32:20 +0300 Subject: [PATCH] add one more git branch not found pattern --- pkg/worker/lib/fetchers/git.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/worker/lib/fetchers/git.go b/pkg/worker/lib/fetchers/git.go index 23ff5063..b0b4c9de 100644 --- a/pkg/worker/lib/fetchers/git.go +++ b/pkg/worker/lib/fetchers/git.go @@ -36,7 +36,8 @@ func (gf Git) clone(ctx context.Context, sg *result.StepGroup, repo *Repo, exec out = cloneRes.StdOut + cloneRes.StdErr } noBranchOrRepo := strings.Contains(out, "could not read Username for") || - strings.Contains(out, "Could not find remote branch") + strings.Contains(out, "Could not find remote branch") || + (strings.Contains(out, "Remote branch") && strings.Contains(out, "not found in upstream")) if noBranchOrRepo { return ErrNoBranchOrRepo }