Stop logging CheckPath returns error: context canceled (#21064) (#21405)

Backport #21064

We should only log CheckPath errors if they are not simply due to
context cancellation - and we should add a little more context to the
error message.

Fix #20709

Signed-off-by: Andrew Thornton <[email protected]>

Signed-off-by: Andrew Thornton <[email protected]>
This commit is contained in:
zeripath
2022-10-11 16:35:29 +08:00
committed by GitHub
co-authored by GitHub
parent c83a05f114
commit 1f804d35ca
2 changed files with 2 additions and 4 deletions
-2
View File
@@ -1448,8 +1448,6 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff
} else if language, has := attrs["gitlab-language"]; has && language != "unspecified" && language != "" {
diffFile.Language = language
}
} else {
log.Error("Unexpected error: %v", err)
}
}