Skip to content

Commit 76e368c

Browse files
committed
t3700: fix broken test under !SANITY
An "add --chmod=+x" test recently added by 610d55a ("add: modify already added files when --chmod is given", 2016-09-14) used "xfoo3" as a test file. The paths xfoo[1-3] were used by earlier tests for symbolic links but they were expected to have been removed by the time the execution reached this new test. The removal with "git reset --hard" however happened in a pair of earlier tests, both of which are protected by POSIXPERM,SANITY prerequisites. Platforms and test environments that lacked these would have seen xfoo3 as a leftover symbolic link that points at somewhere else at this point of the sequence, and the chmod test would have given a wrong result. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40e0dc1 commit 76e368c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t3700-add.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
350350
'
351351

352352
test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
353+
rm -f foo3 xfoo3 &&
353354
echo foo >foo3 &&
354355
git add foo3 &&
355356
git add --chmod=+x foo3 &&

0 commit comments

Comments
 (0)