Skip to content

Commit

Permalink
fix: deepen fails on EMPTY repos (#7537)
Browse files Browse the repository at this point in the history
  • Loading branch information
klesh committed May 29, 2024
1 parent 9babe93 commit a9ac7ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/plugins/gitextractor/parser/clone_gitcli.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ func (g *GitcliCloner) CloneRepo(ctx plugin.SubTaskContext, localDir string) err
return errors.Default.Wrap(err, "failed to repack the repo")
}
deepenCmd := exec.CommandContext(ctx.GetContext(), "git", "-C", localDir, "fetch", "--deepen=1")
// deepen would fail on a EMPTY repo, ignore the error
if err := deepenCmd.Run(); err != nil {
return errors.Default.Wrap(err, "failed to deepen the cloned repo")
g.logger.Error(err, "failed to deepen the cloned repo")
}
}

Expand Down

0 comments on commit a9ac7ab

Please sign in to comment.