Skip to content

commit: Fix nil panic in LastCommitForPath

Will Chandler (ex-GitLab) requested to merge wc/last-commit-nil-check into master

Currently in lastCommitForPath we check if the error returned by log.LastCommitForPath is a NotFoundError, but do not handle the presence of any other error. This has been causing panics when trying to send a nil commit in the response, most commonly when the request hits its deadline and is canceled.

Add a check to handle any error other than NotFoundError.

Changelog: fixed

Merge request reports

Loading