gitaly: Don't wrap `updateref.ErrInvalidReferenceFormat`
requested to merge 4797-flaky-test-testtransactionmanager-invalid_reference_aborts_the_entire_transaction-flaky-2 into master
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)