Skip to content

Commit 57ea241

Browse files
rscharfegitster
authored andcommitted
t3700: fix broken test under !POSIXPERM
76e368c (t3700: fix broken test under !SANITY) explains that the test 'git add --chmod=[+-]x changes index with already added file' can fail if xfoo3 is still present as a symlink from a previous test and deletes it with rm(1). That still leaves it present in the index, which causes the test to fail if POSIXPERM is not defined. Get rid of it by calling "git reset --hard" as well, as 76e368c already mentioned in passing. Helped-by: Adam Dinwoodie <[email protected]> Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 454cb6b commit 57ea241

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
@@ -356,6 +356,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
356356

357357
test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
358358
rm -f foo3 xfoo3 &&
359+
git reset --hard &&
359360
echo foo >foo3 &&
360361
git add foo3 &&
361362
git add --chmod=+x foo3 &&

0 commit comments

Comments
 (0)