Skip to content

Commit 0e1b501

Browse files
Benabikgitster
authored andcommitted
t7606: Avoid using head as a file name
A file named 'head' gets confused with the HEAD ref on case-insensitive file systems. Replace '>head' with '>head.new' to match the '>head.old' files they are compared to. Signed-off-by: Brian Gernhardt <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 52b48ef commit 0e1b501

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t7606-merge-custom.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test_expect_success 'merge c2 with a custom strategy' '
4646
git rev-parse c2^{tree} >tree.expected &&
4747
git merge -s theirs c2 &&
4848
49-
git rev-parse HEAD >head &&
49+
git rev-parse HEAD >head.new &&
5050
git rev-parse HEAD^1 >first-parent &&
5151
git rev-parse HEAD^2 >second-parent &&
5252
git rev-parse HEAD^{tree} >tree &&
@@ -55,7 +55,7 @@ test_expect_success 'merge c2 with a custom strategy' '
5555
git diff --exit-code c2 HEAD &&
5656
git diff --exit-code c2 &&
5757
58-
! test_cmp head.old head &&
58+
! test_cmp head.old head.new &&
5959
test_cmp head.old first-parent &&
6060
test_cmp second-parent.expected second-parent &&
6161
test_cmp tree.expected tree &&
@@ -72,7 +72,7 @@ test_expect_success 'trivial merge with custom strategy' '
7272
git rev-parse c3^{tree} >tree.expected &&
7373
git merge -s theirs c3 &&
7474
75-
git rev-parse HEAD >head &&
75+
git rev-parse HEAD >head.new &&
7676
git rev-parse HEAD^1 >first-parent &&
7777
git rev-parse HEAD^2 >second-parent &&
7878
git rev-parse HEAD^{tree} >tree &&
@@ -81,7 +81,7 @@ test_expect_success 'trivial merge with custom strategy' '
8181
git diff --exit-code c3 HEAD &&
8282
git diff --exit-code c3 &&
8383
84-
! test_cmp head.old head &&
84+
! test_cmp head.old head.new &&
8585
test_cmp head.old first-parent &&
8686
test_cmp second-parent.expected second-parent &&
8787
test_cmp tree.expected tree &&

0 commit comments

Comments
 (0)