If the ref doesn't exist, and the source branch is deleted, we can't get it back easily. Previously, we ignored this error by shelling out, so replicate that behaviour.
name
if !
unless
current_application_settings
Gitlab::CurrentSettings