t3700: fix broken test under !POSIXPERM
76e368c378 (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 76e368c378 already mentioned in passing. Helped-by: Adam Dinwoodie <adam@dinwoodie.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Aug 8, 2017 at 21:21 UTC
57ea241ef09979560b7512bb5115e2a7b3914fcb
1 file changed
+1
t/t3700-add.sh
+1
@@ -356,6 +356,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' '
356
357
test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
358
rm -f foo3 xfoo3 &&
359
+ git reset --hard &&
360
echo foo >foo3 &&
361
git add foo3 &&
362
git add --chmod=+x foo3 &&