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
Showing the changes to services/gitdiff/gitdiff.go (1 of 2 files). Show all
Unified · Split
| @@ -1178,8 +1178,6 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff · 1177 unmodified lines | ||
| 1178 | 1178 | } else if language, has := attrs["gitlab-language"]; has && language != "unspecified" && language != "" { |
| 1179 | 1179 | diffFile.Language = language |
| 1180 | 1180 | } |
| 1181 | − } else { | |
| 1182 | − log.Error("Unexpected error: %v", err) | |
| 1183 | 1181 | } |
| 1184 | 1182 | } |
| 1185 | 1183 | |