From 3ccebf7f4044b85eef975e4544785893da763bd2 Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 10 Oct 2022 21:54:30 +0100 Subject: Stop logging CheckPath returns error: context canceled (#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 --- services/gitdiff/gitdiff.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'services/gitdiff') diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 9844992f5b..e7362cdcdd 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -1178,8 +1178,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) } } -- cgit v1.2.3