Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit d281099

Browse files
fix cloc error for gerrit repos (#91)
Signed-off-by: Ayman <enkhalifapro@gmail.com> Co-authored-by: Ayman <enkhalifapro@gmail.com>
1 parent d5e419a commit d281099

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/git/git.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3791,6 +3791,11 @@ func (j *DSGit) getCloc(ctx *shared.Ctx, headSha string) error {
37913791
j.log.WithFields(logrus.Fields{"operation": "Sync"}).Errorf("error executing command: %v, error: %v, output: %s, output error: %s", cmdLine, err, sout, serr)
37923792
return err
37933793
}
3794+
3795+
if sout == "" {
3796+
return nil
3797+
}
3798+
37943799
r := make(map[string]clocResult)
37953800
err = jsoniter.Unmarshal([]byte(sout), &r)
37963801
if err != nil {

0 commit comments

Comments
 (0)