pub async fn ensure_remote_head(repo: &Path, remote: &str, base: &str)Expand description
Record refs/remotes/<remote>/HEAD -> <remote>/<base> when it is absent,
so a later read of the remote’s default (Config::discover) agrees with
the branch just resolved even when git did not create the symref on fetch
(followRemoteHEAD=never, old git). Moves only refs/remotes; an existing
symref is left alone. Best effort.