From: René Scharfe Date: Tue, 8 Aug 2017 19:21:41 +0000 (+0200) Subject: t3700: fix broken test under !POSIXPERM X-Git-Tag: v2.14.2~19^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/57ea241ef09979560b7512bb5115e2a7b3914fcb?hp=--cc 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 Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- 57ea241ef09979560b7512bb5115e2a7b3914fcb diff --git a/t/t3700-add.sh b/t/t3700-add.sh index f3a4b4a913..0aae21d698 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -356,6 +356,7 @@ test_expect_success POSIXPERM,SYMLINKS 'git add --chmod=+x with symlinks' ' test_expect_success 'git add --chmod=[+-]x changes index with already added file' ' rm -f foo3 xfoo3 && + git reset --hard && echo foo >foo3 && git add foo3 && git add --chmod=+x foo3 &&