pub fn delete_reference_if_present(
repo: &Repository,
name: &str,
) -> GitProjectionResult<()>Expand description
Delete a reference if present; missing-ref is a no-op. Used by the
write-through rollback path to drop a branch that was created by a
failed write-through but isn’t reachable from any prior state. We
scope the deletion with RefPrecondition::MustExist so an unrelated
concurrent writer that just updated this ref isn’t silently
clobbered — if the ref vanished underneath us between our read and
the delete, that’s the rollback we wanted anyway.