Skip to content

gitaly: Don't wrap `updateref.ErrInvalidReferenceFormat`

In prepareReferenceTransaction we first call updater.Update and then updater.Prepare. In updater.Prepare we check for updateref.ErrInvalidReferenceFormat and if found, we wrap it with gitaly.InvalidReferenceFormatError.

This is flaky, since we don't check for the same in updater.Update. Since the error from git can occur in either the Update or Prepare stage, we could end up with either updateref.ErrInvalidReferenceFormat or gitaly.InvalidReferenceFormatError. Let's fix this racy-flake by just relying and testing for updateref.ErrInvalidReferenceFormat.

Closes #4797 (closed)

Merge request reports