Closed mjcheetham closed 4 years ago
Scalar clones using the GVFS protocol & helper work differently, and already take the default remote branch name from the manual call to
/info/refs?service=git-upload-pack
.
Ah! This is why this has worked for the Windows and Office customers. Thanks for discovering this!
Attempt to determine the remote's default branch name when performing a
scalar clone
using the vanilla Git protocols (not using the GVFS helper).Use
ls-remote
to lookup theHEAD
ref on the remote, and parse the results. If the remote'sHEAD
is not a branch, or we fail to parse the output for any reason, consult Git itself for the default branch name as a fallback.Scalar clones using the GVFS protocol & helper work differently, and already take the default remote branch name from the manual call to
/info/refs?service=git-upload-pack
.Fixes #438