You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2024/04/17 02:30:10 UTC

(incubator-devlake) branch kw-gitext-error-out-on-empty-bitbucket-shallow-clone created (now 0047b9ae5)

This is an automated email from the ASF dual-hosted git repository.

klesh pushed a change to branch kw-gitext-error-out-on-empty-bitbucket-shallow-clone
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 0047b9ae5 fix: gitextractor error out on empty bitbucket shallow clone

This branch includes the following new commits:

     new 0047b9ae5 fix: gitextractor error out on empty bitbucket shallow clone

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: fix: gitextractor error out on empty bitbucket shallow clone

Posted by kl...@apache.org.
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 <zh...@merico.dev>
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")