History

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

zeripath committed 4 years ago

Commit 3ccebf71 parent 94037ad2 files · +2 −4Browse files

Showing the changes to services/gitdiff/gitdiff.go (1 of 2 files). Show all

Unified · Split

services/gitdiff/gitdiff.go+0−2
@@ -1178,8 +1178,6 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff · 1177 unmodified lines
1178 } else if language, has := attrs["gitlab-language"]; has && language != "unspecified" && language != "" {1178 } else if language, has := attrs["gitlab-language"]; has && language != "unspecified" && language != "" {
1179 diffFile.Language = language1179 diffFile.Language = language
1180 }1180 }
1181 } else {
1182 log.Error("Unexpected error: %v", err)
1183 }1181 }
1184 }1182 }
1185 1183