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

warren 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 5d186e9b fix: gitextractor does not collect remote branch
5d186e9b is described below

commit 5d186e9b26d383beee503820aab8ee07d9df914d
Author: zhangliang <[email protected]>
AuthorDate: Tue Jun 14 15:37:39 2022 +0800

    fix: gitextractor does not collect remote branch
---
 plugins/gitextractor/parser/libgit2.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/gitextractor/parser/libgit2.go 
b/plugins/gitextractor/parser/libgit2.go
index 29f726a1..0e907c48 100644
--- a/plugins/gitextractor/parser/libgit2.go
+++ b/plugins/gitextractor/parser/libgit2.go
@@ -112,7 +112,7 @@ func (l *LibGit2) run(repo *git.Repository, repoId string) 
error {
                default:
                        break
                }
-               if branch.IsBranch() {
+               if branch.IsBranch() || branch.IsRemote() {
                        name, err1 := branch.Name()
                        if err1 != nil {
                                return err1

Reply via email to