{"thread":{"id":"44117","subject":"[PATCH tg/add-chmod+x-fix 1/2] t3700-add: create subdirectory gently","startedAt":"2016-09-20T06:16:21Z","lastAt":"2016-09-22T21:01:26Z","messageCount":11,"participants":["Johannes Sixt","Thomas Gummerer","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"302214","messageId":"cee3c784-8f03-c524-2f67-d35cb3755a41@kdbg.org","threadId":"44117","inReplyTo":null,"subject":"[PATCH tg/add-chmod+x-fix 1/2] t3700-add: create subdirectory gently","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-20T06:16:11Z","receivedAt":"2016-09-20T06:16:21Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"The subdirectory 'sub' is created early in the test file. Later, a test\ncase removes it during its clean-up actions. However, this test case is\nprotected by POSIXPERM. Consequently, 'sub' remains when the POSIXPERM\nprerequisite is not satisfied. Later, a recently introduced test case\ncreates 'sub' again. Use -p with mkdir so that it does not fail if 'sub'\nalready exists.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t3700-add.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 0a962a6..16ab2da 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -380,7 +380,7 @@ test_expect_success 'no file status change if no pathspec is given' '\n '\n \n test_expect_success 'no file status change if no pathspec is given in subdir' '\n-\tmkdir sub &&\n+\tmkdir -p sub &&\n \t(\n \t\tcd sub &&\n \t\t>sub-foo1 &&\n-- \n2.10.0.85.gea34e30\n\n"},{"id":"302215","messageId":"5effaf36-d017-3ff1-1de1-d9b303c04f23@kdbg.org","threadId":"44117","inReplyTo":"cee3c784-8f03-c524-2f67-d35cb3755a41@kdbg.org","subject":"[PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-20T06:18:25Z","receivedAt":"2016-09-20T06:18:46Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"A recently introduced test checks the result of 'git status' after\nsetting the executable bit on a file. This check does not yield the\nexpected result when the filesystem does not support the executable bit\n(and core.filemode is false). Skip the test case.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n I am surprised that add --chmod=+x changes only the index, but not\n the file on disk!?!\n\n t/t3700-add.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 16ab2da..13e0dd2 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -361,7 +361,7 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n \ttest_mode_in_index 100644 xfoo3\n '\n \n-test_expect_success 'file status is changed after git add --chmod=+x' '\n+test_expect_success POSIXPERM 'file status is changed after git add --chmod=+x' '\n \techo \"AM foo4\" >expected &&\n \techo foo >foo4 &&\n \tgit add foo4 &&\n-- \n2.10.0.85.gea34e30\n\n"},{"id":"302246","messageId":"20160920192828.GF8254@hank","threadId":"44117","inReplyTo":"cee3c784-8f03-c524-2f67-d35cb3755a41@kdbg.org","subject":"Re: [PATCH tg/add-chmod+x-fix 1/2] t3700-add: create subdirectory gently","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2016-09-20T19:28:28Z","receivedAt":"2016-09-20T19:28:15Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Hi Johannes,\n\nOn 09/20, Johannes Sixt wrote:\n> The subdirectory 'sub' is created early in the test file. Later, a test\n> case removes it during its clean-up actions. However, this test case is\n> protected by POSIXPERM. Consequently, 'sub' remains when the POSIXPERM\n> prerequisite is not satisfied. Later, a recently introduced test case\n> creates 'sub' again. Use -p with mkdir so that it does not fail if 'sub'\n> already exists.\n\nThanks for catching and fixing this.  Having a look at the tests shows\nthat this happens through a git reset --hard at the start of the tests\nthat require POSIXPERM, which makes me wonder whether we should do\nsuch a cleanup somewhere unconditionally, or move the tests that do\nrequire POSIXPERM to the end of the test file to possibly prevent\nsimilar breakages in the future?\n\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  t/t3700-add.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/t3700-add.sh b/t/t3700-add.sh\n> index 0a962a6..16ab2da 100755\n> --- a/t/t3700-add.sh\n> +++ b/t/t3700-add.sh\n> @@ -380,7 +380,7 @@ test_expect_success 'no file status change if no pathspec is given' '\n>  '\n>  \n>  test_expect_success 'no file status change if no pathspec is given in subdir' '\n> -\tmkdir sub &&\n> +\tmkdir -p sub &&\n>  \t(\n>  \t\tcd sub &&\n>  \t\t>sub-foo1 &&\n> -- \n> 2.10.0.85.gea34e30\n> \n\n-- \nThomas\n"},{"id":"302248","messageId":"20160920193444.GG8254@hank","threadId":"44117","inReplyTo":"5effaf36-d017-3ff1-1de1-d9b303c04f23@kdbg.org","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2016-09-20T19:34:44Z","receivedAt":"2016-09-20T19:34:29Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Hi Johannes,\n\nOn 09/20, Johannes Sixt wrote:\n> A recently introduced test checks the result of 'git status' after\n> setting the executable bit on a file. This check does not yield the\n> expected result when the filesystem does not support the executable bit\n> (and core.filemode is false). Skip the test case.\n\nThanks for cleaning up my mess.  The patch looks correct to me.\n\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  I am surprised that add --chmod=+x changes only the index, but not\n>  the file on disk!?!\n\nI *think* --chmod is mainly thought of as a convenience for git users\non a filesystem that doesn't have an executable flag.  So it was\nintroduced this way as the permissions on the file system don't matter\nin that case.  A change of that behaviour may make sense for this\nthough.\n\n>  t/t3700-add.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/t/t3700-add.sh b/t/t3700-add.sh\n> index 16ab2da..13e0dd2 100755\n> --- a/t/t3700-add.sh\n> +++ b/t/t3700-add.sh\n> @@ -361,7 +361,7 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n>  \ttest_mode_in_index 100644 xfoo3\n>  '\n>  \n> -test_expect_success 'file status is changed after git add --chmod=+x' '\n> +test_expect_success POSIXPERM 'file status is changed after git add --chmod=+x' '\n>  \techo \"AM foo4\" >expected &&\n>  \techo foo >foo4 &&\n>  \tgit add foo4 &&\n> -- \n> 2.10.0.85.gea34e30\n> \n\n-- \nThomas\n"},{"id":"302308","messageId":"xmqqtwd986ml.fsf@gitster.mtv.corp.google.com","threadId":"44117","inReplyTo":"20160920193444.GG8254@hank","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-21T18:12:02Z","receivedAt":"2016-09-21T18:12:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thomas Gummerer <t.gummerer@gmail.com> writes:\n\n>>  I am surprised that add --chmod=+x changes only the index, but not\n>>  the file on disk!?!\n>\n> I *think* --chmod is mainly thought of as a convenience for git users\n> on a filesystem that doesn't have an executable flag.  So it was\n> introduced this way as the permissions on the file system don't matter\n> in that case.  A change of that behaviour may make sense for this\n> though.\n\nPerhaps we shouldn't even test this, then?  I can see future people\nwanting to change this behaviour, while I can see argument for not\ntouching the working tree file, too.  It is essential for the main\npurpose of the command (i.e. \"I want to flip the executable bit for\nthe path in the index\") to make sure that the bit in the index is\nchanged.  Comparing the index with the working tree using \"status\"\nis probably not how you would want to do so.  A future breakage may\ncause the indexed blob name to change by mistake, and status would\nhappily report difference but you would not notice its output is\nsaying \"Hey, they are different between the index and the working\ntree\", while you are expecting ONLY the change in the executable bit.\n\nHow about doing\n\n\tgit add foo4 &&\n        git add --chmod=+x foo4 &&\n\ttest_mode_in_index 100755 foo4\n\ninstead?\n\n>\n>>  t/t3700-add.sh | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>> \n>> diff --git a/t/t3700-add.sh b/t/t3700-add.sh\n>> index 16ab2da..13e0dd2 100755\n>> --- a/t/t3700-add.sh\n>> +++ b/t/t3700-add.sh\n>> @@ -361,7 +361,7 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n>>  \ttest_mode_in_index 100644 xfoo3\n>>  '\n>>  \n>> -test_expect_success 'file status is changed after git add --chmod=+x' '\n>> +test_expect_success POSIXPERM 'file status is changed after git add --chmod=+x' '\n>>  \techo \"AM foo4\" >expected &&\n>>  \techo foo >foo4 &&\n>>  \tgit add foo4 &&\n>> -- \n>> 2.10.0.85.gea34e30\n>> \n"},{"id":"302327","messageId":"8b612559-ce78-db7d-235f-61b5f78720e4@kdbg.org","threadId":"44117","inReplyTo":"xmqqtwd986ml.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-21T20:47:37Z","receivedAt":"2016-09-21T20:47:54Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 21.09.2016 um 20:12 schrieb Junio C Hamano:\n> Thomas Gummerer <t.gummerer@gmail.com> writes:\n>\n>>>  I am surprised that add --chmod=+x changes only the index, but not\n>>>  the file on disk!?!\n>>\n>> I *think* --chmod is mainly thought of as a convenience for git users\n>> on a filesystem that doesn't have an executable flag.  So it was\n>> introduced this way as the permissions on the file system don't matter\n>> in that case.\n\nOK.\n\n>>  A change of that behaviour may make sense for this\n>> though.\n\nHm, git-add is for moving content from the worktree to the index. I \ndon't think it should change the worktree. I should not have been surprised.\n\nIt should probably not even introduce a change in the index that it does \nnot see in the worktree, but, hey, git-add is a reasonable porcelain \nsubstitute for the --chmod task that otherwise git-update-index would \nhave to do.\n\n> Perhaps we shouldn't even test this, then?\n\nIf I am right that git-add should not change the worktree, it should be \ntested. But 'git status -s' is probably the wrong tool for the reasons \nyou gave (it could accidentally detect a change due to content \ndifference instead of a file mode difference). At any rate, such a test \nmust be protected with POSIXPERM.\n\n-- Hannes\n\n"},{"id":"302328","messageId":"xmqqa8f16kup.fsf@gitster.mtv.corp.google.com","threadId":"44117","inReplyTo":"xmqqtwd986ml.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-21T20:47:42Z","receivedAt":"2016-09-21T20:47:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> ...  Comparing the index with the working tree using \"status\"\n> is probably not how you would want to do so.  A future breakage may\n> cause the indexed blob name to change by mistake, and status would\n> happily report difference but you would not notice its output is\n> saying \"Hey, they are different between the index and the working\n> tree\", while you are expecting ONLY the change in the executable bit.\n\nIn other words, how about doing it this way?\n\n-- >8 --\nFrom: Johannes Sixt <j6t@kdbg.org>\nDate: Tue, 20 Sep 2016 08:18:25 +0200\nSubject: [PATCH] t3700-add: do not rely on executable bit of the working tree file\n\nA recently introduced test checks the result of 'git status' after\nsetting the executable bit on a file. This check does not yield the\nexpected result when the filesystem does not support the executable\nbit.\n\nThe primary thing we care about is that a file added with --chmod=+x\nhas executable bit in the index, not that it is registered in the\nindex somehow differently from what is in the working tree, which\nis what the \"status\" output tries to catch.  Let's check what we\ncare about, i.e. the path is marked as an executable in the index.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t3700-add.sh | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 16ab2da..1a733bb 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -361,13 +361,11 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n \ttest_mode_in_index 100644 xfoo3\n '\n \n-test_expect_success 'file status is changed after git add --chmod=+x' '\n-\techo \"AM foo4\" >expected &&\n+test_expect_success 'git add --chmod=[+-]x changes index with newly added file' '\n \techo foo >foo4 &&\n \tgit add foo4 &&\n \tgit add --chmod=+x foo4 &&\n-\tgit status -s foo4 >actual &&\n-\ttest_cmp expected actual\n+\ttest_mode_in_index 100755 foo4\n '\n \n test_expect_success 'no file status change if no pathspec is given' '\n-- \n2.10.0-515-g9036219\n\n"},{"id":"302329","messageId":"c3aefd9d-b794-21a1-619e-bce6a3c2cf47@kdbg.org","threadId":"44117","inReplyTo":"xmqqa8f16kup.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-21T20:58:55Z","receivedAt":"2016-09-21T20:59:02Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 21.09.2016 um 22:47 schrieb Junio C Hamano:\n> -test_expect_success 'file status is changed after git add --chmod=+x' '\n> -\techo \"AM foo4\" >expected &&\n> +test_expect_success 'git add --chmod=[+-]x changes index with newly added file' '\n>  \techo foo >foo4 &&\n>  \tgit add foo4 &&\n>  \tgit add --chmod=+x foo4 &&\n> -\tgit status -s foo4 >actual &&\n> -\ttest_cmp expected actual\n> +\ttest_mode_in_index 100755 foo4\n>  '\n\nNo, that's redundant. There are plenty of other test cases that check \nfor this. You could just remove the case.\n\nBut I came to a different conclusion as I said in a message that crossed \nyours. I hope Thomas can pick up the baton again.\n\n-- Hannes\n\n"},{"id":"302331","messageId":"xmqq60pp6jor.fsf@gitster.mtv.corp.google.com","threadId":"44117","inReplyTo":"c3aefd9d-b794-21a1-619e-bce6a3c2cf47@kdbg.org","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-09-21T21:12:52Z","receivedAt":"2016-09-21T21:13:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> But I came to a different conclusion as I said in a message that\n> crossed yours. I hope Thomas can pick up the baton again.\n\nYeah, our mails crossed, apparently, and I do agree with your\nreasoning.  How about this, then?\n\n-- >8 -- \nFrom: Johannes Sixt <j6t@kdbg.org>\nDate: Tue, 20 Sep 2016 08:18:25 +0200\nSubject: [PATCH] t3700-add: do not check working tree file mode without POSIXPERM\n\nA recently introduced test checks the result of 'git status' after\nsetting the executable bit on a file. This check does not yield the\nexpected result when the filesystem does not support the executable\nbit.\n\nWhat we care about is that a file added with \"--chmod=+x\" has\nexecutable bit in the index and that \"--chmod=+x\" (or any other\noptions for that matter) does not muck with working tree files.\nThe former is tested by other existing tests, so let's check the\nlatter more explicitly and only under POSIXPERM prerequisite.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t3700-add.sh | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex 16ab2da..924a266 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -361,13 +361,11 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n \ttest_mode_in_index 100644 xfoo3\n '\n \n-test_expect_success 'file status is changed after git add --chmod=+x' '\n-\techo \"AM foo4\" >expected &&\n+test_expect_success POSIXPERM 'git add --chmod=[+-]x does not change the working tree' '\n \techo foo >foo4 &&\n \tgit add foo4 &&\n \tgit add --chmod=+x foo4 &&\n-\tgit status -s foo4 >actual &&\n-\ttest_cmp expected actual\n+\t! test -x foo4\n '\n \n test_expect_success 'no file status change if no pathspec is given' '\n-- \n2.10.0-515-g9036219\n\n"},{"id":"302356","messageId":"e139199f-1542-855e-d473-6a5d068ccdef@kdbg.org","threadId":"44117","inReplyTo":"xmqq60pp6jor.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-09-22T05:06:29Z","receivedAt":"2016-09-22T05:06:39Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 21.09.2016 um 23:12 schrieb Junio C Hamano:\n> Johannes Sixt <j6t@kdbg.org> writes:\n>\n>> But I came to a different conclusion as I said in a message that\n>> crossed yours. I hope Thomas can pick up the baton again.\n>\n> Yeah, our mails crossed, apparently, and I do agree with your\n> reasoning.  How about this, then?\n>\n> -- >8 --\n> From: Johannes Sixt <j6t@kdbg.org>\n> Date: Tue, 20 Sep 2016 08:18:25 +0200\n> Subject: [PATCH] t3700-add: do not check working tree file mode without POSIXPERM\n>\n> A recently introduced test checks the result of 'git status' after\n> setting the executable bit on a file. This check does not yield the\n> expected result when the filesystem does not support the executable\n> bit.\n>\n> What we care about is that a file added with \"--chmod=+x\" has\n> executable bit in the index and that \"--chmod=+x\" (or any other\n> options for that matter) does not muck with working tree files.\n> The former is tested by other existing tests, so let's check the\n> latter more explicitly and only under POSIXPERM prerequisite.\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  t/t3700-add.sh | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t3700-add.sh b/t/t3700-add.sh\n> index 16ab2da..924a266 100755\n> --- a/t/t3700-add.sh\n> +++ b/t/t3700-add.sh\n> @@ -361,13 +361,11 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n>  \ttest_mode_in_index 100644 xfoo3\n>  '\n>\n> -test_expect_success 'file status is changed after git add --chmod=+x' '\n> -\techo \"AM foo4\" >expected &&\n> +test_expect_success POSIXPERM 'git add --chmod=[+-]x does not change the working tree' '\n>  \techo foo >foo4 &&\n>  \tgit add foo4 &&\n>  \tgit add --chmod=+x foo4 &&\n> -\tgit status -s foo4 >actual &&\n> -\ttest_cmp expected actual\n> +\t! test -x foo4\n>  '\n>\n>  test_expect_success 'no file status change if no pathspec is given' '\n>\n\nThat makes a lot of sense. Thank you so much!\n\n-- Hannes\n\n"},{"id":"302410","messageId":"20160922210141.GH8254@hank","threadId":"44117","inReplyTo":"xmqq60pp6jor.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH tg/add-chmod+x-fix 2/2] t3700-add: protect one --chmod=+x test with POSIXPERM","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2016-09-22T21:01:41Z","receivedAt":"2016-09-22T21:01:26Z","isPatch":true,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 09/21, Junio C Hamano wrote:\n> Johannes Sixt <j6t@kdbg.org> writes:\n> \n> > But I came to a different conclusion as I said in a message that\n> > crossed yours. I hope Thomas can pick up the baton again.\n\nSorry for not getting back earlier, my git time is quite limited\nunfortunately.\n\n> Yeah, our mails crossed, apparently, and I do agree with your\n> reasoning.  How about this, then?\n\nThanks, both the reasoning and the patch below make sense to me.\n\n> -- >8 -- \n> From: Johannes Sixt <j6t@kdbg.org>\n> Date: Tue, 20 Sep 2016 08:18:25 +0200\n> Subject: [PATCH] t3700-add: do not check working tree file mode without POSIXPERM\n> \n> A recently introduced test checks the result of 'git status' after\n> setting the executable bit on a file. This check does not yield the\n> expected result when the filesystem does not support the executable\n> bit.\n> \n> What we care about is that a file added with \"--chmod=+x\" has\n> executable bit in the index and that \"--chmod=+x\" (or any other\n> options for that matter) does not muck with working tree files.\n> The former is tested by other existing tests, so let's check the\n> latter more explicitly and only under POSIXPERM prerequisite.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  t/t3700-add.sh | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n> \n> diff --git a/t/t3700-add.sh b/t/t3700-add.sh\n> index 16ab2da..924a266 100755\n> --- a/t/t3700-add.sh\n> +++ b/t/t3700-add.sh\n> @@ -361,13 +361,11 @@ test_expect_success 'git add --chmod=[+-]x changes index with already added file\n>  \ttest_mode_in_index 100644 xfoo3\n>  '\n>  \n> -test_expect_success 'file status is changed after git add --chmod=+x' '\n> -\techo \"AM foo4\" >expected &&\n> +test_expect_success POSIXPERM 'git add --chmod=[+-]x does not change the working tree' '\n>  \techo foo >foo4 &&\n>  \tgit add foo4 &&\n>  \tgit add --chmod=+x foo4 &&\n> -\tgit status -s foo4 >actual &&\n> -\ttest_cmp expected actual\n> +\t! test -x foo4\n>  '\n>  \n>  test_expect_success 'no file status change if no pathspec is given' '\n> -- \n> 2.10.0-515-g9036219\n> \n\n-- \nThomas\n"}]}