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

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 10f8358a4 fix: gitextractor error out on empty bitbucket shallow clone 
(#7338)
10f8358a4 is described below

commit 10f8358a43ee177aaeca84c4f43143b6c67cb1e7
Author: Klesh Wong <[email protected]>
AuthorDate: Wed Apr 17 10:54:18 2024 +0800

    fix: gitextractor error out on empty bitbucket shallow clone (#7338)
---
 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")

Reply via email to