diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-06-24 14:46:35 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-06-24 09:14:21 -0700 |
commit | a471214bd610bb415a37d5b2c3506b83549acd57 (patch) | |
tree | da4811bd343763fb77d4166a9802e6fdb39bf4ba /t/t1010-mktree.sh | |
parent | clone: use configured default branch name when appropriate (diff) | |
download | tgif-a471214bd610bb415a37d5b2c3506b83549acd57.tar.xz |
remote: use the configured default branch name when appropriate
When guessing the default branch name of a remote, and there are no refs
to guess from, we want to go with the preference specified by the user
for the fall-back, i.e. the default name to be used for the initial
branch of new repositories (because as far as the user is concerned, a
remote that has no branches yet is a new repository).
At the same time, when talking to an older Git server that does not
report a symref for `HEAD` (but instead reports a commit hash), let's
try to guess the configured default branch name first. If it does not
match the reported commit hash, let's fall back to `master` as before.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1010-mktree.sh')
0 files changed, 0 insertions, 0 deletions