At the time of the test xfoo1 already exists and is a link.
As a result, the check for file mode 100644 fails.

Create not yet existing file xfoo instead.

Signed-off-by: Ingo Brückl <i...@wupperonline.de>
---
 t/t3700-add.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 4865304..aee61b9 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -342,12 +342,12 @@ test_expect_success 'git add --chmod=+x stages a 
non-executable file with +x' '
 '

 test_expect_success 'git add --chmod=-x stages an executable file with -x' '
-       echo foo >xfoo1 &&
-       chmod 755 xfoo1 &&
-       git add --chmod=-x xfoo1 &&
-       case "$(git ls-files --stage xfoo1)" in
-       100644" "*xfoo1) echo pass;;
-       *) echo fail; git ls-files --stage xfoo1; (exit 1);;
+       echo foo >xfoo &&
+       chmod 755 xfoo &&
+       git add --chmod=-x xfoo &&
+       case "$(git ls-files --stage xfoo)" in
+       100644" "*xfoo) echo pass;;
+       *) echo fail; git ls-files --stage xfoo; (exit 1);;
        esac
 '

--
2.9.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to