Skip to content
Snippets Groups Projects
Commit e8c4eb6f authored by Sami Hiltunen's avatar Sami Hiltunen
Browse files

Parse update-ref error from Prepare prior to escaping it

Prepare is parsing the error returned from setState to return a typed
error. The error returned from setState has already escaped the stderr
though. This results in reference names which have characters that would
be escaped to be reported back to the caller incorrectly. For example,
'refs/heads\main' would be reported back as 'refs/heads\\main'. Fix this
by parsing the error already in setState prior to escaping.

refLockedRegex was tightened up as the same 'cannot lock ref' matches more
than one error and would change behavior of commit otherwise. The new regex
matches only the expected error.
parent 7767d7b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment