operations: Use `ExpectedOldOid` in `UserDeleteBranch`
If the clients provide the ExpectedOldOid
in the request of
UserDeleteBranch
, we need to use this as the ref's current OID for
updating the reference.
This is directly fed to git-update-ref(1) where it'll exit with an error code if the current OID of the ref doesn't match the OID provided by us. This allows us to avoid any race conditions wherein the branch was deleted concurrently by another process.
Part of #4407 (closed)
Edited by Karthik Nayak