Skip to content

localrepo: Use updateref.Update for reference updates

The localrepo.UpdateRef function invokes git-update-ref(1) without transactions. This is also used to update the default branch of the repo. To keep things consistent, let's remove the direct invocation of git-update-ref here and use the updateref.Update struct to do reference updates. This also provides better error handling for us.

Part of #5839 (closed)

Edited by Karthik Nayak

Merge request reports