Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-18 04:21:40 +0300
committerJunio C Hamano <gitster@pobox.com>2021-02-18 04:21:40 +0300
commit69571dfe219f48614e0e0ae7e28efae0be297764 (patch)
tree74213c28659aa3dbcb9ad78a9a6bd946d0c5f6dd /t/t5606-clone-options.sh
parent0871fb9af5aa03a56c42a9257589248624d75eb8 (diff)
parent4f37d45706514a4b3d0259d26f719678a0cf3521 (diff)
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-xt/t5606-clone-options.sh8
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' '