Skip to content

Commit 601b3ae

Browse files
committed
t5510: test the other side of the D/F conflict as well
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c141058 commit 601b3ae

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

t/t5510-fetch.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ test_expect_success "clone and setup child repos" '
5959
cd case_sensitive_fd &&
6060
git branch foo/bar &&
6161
git branch Foo
62+
) &&
63+
git clone --ref-format=reftable . case_sensitive_df &&
64+
(
65+
cd case_sensitive_df &&
66+
git branch Foo/bar &&
67+
git branch foo
6268
)
6369
'
6470

@@ -1566,6 +1572,20 @@ test_expect_success CASE_INSENSITIVE_FS,REFFILES 'F/D conflict on case insensiti
15661572
)
15671573
'
15681574

1575+
test_expect_success CASE_INSENSITIVE_FS,REFFILES 'D/F conflict on case insensitive filesystem' '
1576+
test_when_finished rm -rf case_insensitive &&
1577+
(
1578+
git init --bare case_insensitive &&
1579+
cd case_insensitive &&
1580+
git remote add origin -- ../case_sensitive_df &&
1581+
test_must_fail git fetch -f origin "refs/heads/*:refs/heads/*" 2>err &&
1582+
test_grep "failed: refname conflict" err &&
1583+
git rev-parse refs/heads/main >expect &&
1584+
git rev-parse refs/heads/Foo/bar >actual &&
1585+
test_cmp expect actual
1586+
)
1587+
'
1588+
15691589
. "$TEST_DIRECTORY"/lib-httpd.sh
15701590
start_httpd
15711591

0 commit comments

Comments
 (0)