diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:40 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-02-17 17:21:40 -0800 |
commit | 69571dfe219f48614e0e0ae7e28efae0be297764 (patch) | |
tree | 74213c28659aa3dbcb9ad78a9a6bd946d0c5f6dd /t/t5606-clone-options.sh | |
parent | Merge branch 'mr/bisect-in-c-4' (diff) | |
parent | clone: respect remote unborn HEAD (diff) | |
download | tgif-69571dfe219f48614e0e0ae7e28efae0be297764.tar.xz |
Merge branch 'jt/clone-unborn-head'
"git clone" tries to locally check out the branch pointed at by
HEAD of the remote repository after it is done, but the protocol
did not convey the information necessary to do so when copying an
empty repository. The protocol v2 learned how to do so.
* jt/clone-unborn-head:
clone: respect remote unborn HEAD
connect, transport: encapsulate arg in struct
ls-refs: report unborn targets of symrefs
Diffstat (limited to 't/t5606-clone-options.sh')
-rwxr-xr-x | t/t5606-clone-options.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh index 5d6e63a841..52e5789fb0 100755 --- a/t/t5606-clone-options.sh +++ b/t/t5606-clone-options.sh @@ -105,11 +105,13 @@ test_expect_success 'redirected clone -v does show progress' ' ' test_expect_success 'chooses correct default initial branch name' ' - git init --bare empty && + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ + git -c init.defaultBranch=foo init --bare empty && + test_config -C empty lsrefs.unborn advertise && GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \ git -c init.defaultBranch=up clone empty whats-up && - test refs/heads/up = $(git -C whats-up symbolic-ref HEAD) && - test refs/heads/up = $(git -C whats-up config branch.up.merge) + test refs/heads/foo = $(git -C whats-up symbolic-ref HEAD) && + test refs/heads/foo = $(git -C whats-up config branch.foo.merge) ' test_expect_success 'guesses initial branch name correctly' ' |