Skip to content

Commit 5f70859

Browse files
jonathantanmygitster
authored andcommitted
t5606: run clone branch name test with protocol v2
4f37d45 ("clone: respect remote unborn HEAD", 2021-02-05) introduces a new feature (if the remote has an unborn HEAD, e.g. when the remote repository is empty, use it as the name of the branch) that only works in protocol v2, but did not ensure that one of its tests always uses protocol v2, and thus that test would fail if GIT_TEST_PROTOCOL_VERSION=0 (or 1) is used. Therefore, add "-c protocol.version=2" to the appropriate test. (The rest of the tests from that commit have "-c protocol.version=2" already added.) Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f37d45 commit 5f70859

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5606-clone-options.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ test_expect_success 'chooses correct default initial branch name' '
106106
git -c init.defaultBranch=foo init --bare empty &&
107107
test_config -C empty lsrefs.unborn advertise &&
108108
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
109-
git -c init.defaultBranch=up clone empty whats-up &&
109+
git -c init.defaultBranch=up -c protocol.version=2 clone empty whats-up &&
110110
test refs/heads/foo = $(git -C whats-up symbolic-ref HEAD) &&
111111
test refs/heads/foo = $(git -C whats-up config branch.foo.merge)
112112
'

0 commit comments

Comments
 (0)