This is an automated email from the ASF dual-hosted git repository. klesh pushed a commit to branch kw-gitext-error-out-on-empty-bitbucket-shallow-clone in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 0047b9ae5d0b0723a2e00225022bea060d5fd3be Author: Klesh Wong <[email protected]> AuthorDate: Wed Apr 17 10:30:01 2024 +0800 fix: gitextractor error out on empty bitbucket shallow clone --- backend/plugins/gitextractor/parser/clone_gitcli.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/plugins/gitextractor/parser/clone_gitcli.go b/backend/plugins/gitextractor/parser/clone_gitcli.go index bd045fadd..500a30c97 100644 --- a/backend/plugins/gitextractor/parser/clone_gitcli.go +++ b/backend/plugins/gitextractor/parser/clone_gitcli.go @@ -196,7 +196,8 @@ func (g *GitcliCloner) execCloneCommand(cmd *exec.Cmd) errors.Error { err = cmd.Wait() if err != nil { g.logger.Error(err, "git exited with error\n%s", combinedOutput.String()) - if strings.Contains(combinedOutput.String(), "stderr: fatal: error processing shallow info: 4") { + if strings.Contains(combinedOutput.String(), "stderr: fatal: error processing shallow info: 4") || + strings.Contains(combinedOutput.String(), "stderr: fatal: the remote end hung up unexpectedly") { return ErrShallowInfoProcessing } return errors.Default.New("git exit error")
