Fix git error handling (#32401)

This commit is contained in:
wxiaoguang authored and GitHub committed 2024-11-02 11:20:22 +00:00
1 parent 13a203828c
commit e524f63d58
10 files changed
+35 -89

No files matched your search

+1 -1
View File
@@ -1162,7 +1162,7 @@ func GetDiff(ctx context.Context, gitRepo *git.Repository, opts *DiffOptions, fi
Dir: repoPath,
Stdout: writer,
Stderr: stderr,
}); err != nil && err.Error() != "signal: killed" {
}); err != nil && !git.IsErrCanceledOrKilled(err) {
log.Error("error during GetDiff(git diff dir: %s): %v, stderr: %s", repoPath, err, stderr.String())
}