[PATCH] Fix t3701 if core.filemode disabled
From: Alex Riesen <hidden>
Date: 2016-06-15 22:44:37
Subsystem:
the rest · Maintainer:
Linus Torvalds
Signed-off-by: Alex Riesen <redacted> --- Jeff King, Mon, May 19, 2008 22:55:50 +0200:
On Mon, May 19, 2008 at 10:23:42PM +0200, Alex Riesen wrote:quoted
quoted
I setting core.filemode _inside_ the test breaks it in exactly the same way (on Linux, I'm at home). I'll retest tomorrowIt is "git init" which sets core.filemode false (of course!)Ah, of course. In that case, then your change makes sense; by definition, if core.filemode isn't set, those tests are meaningless. Though I think a final version should, as we discussed, omit those tests rather than ending the test script.
Sure. I have explicitely test for core.filemode=false, because some older setups (where git init did not set it) don't have the setting and git config core.filemode reports nothing. t/t3701-add-interactive.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index f15be93..bd94ac6 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh@@ -65,6 +65,7 @@ test_expect_success 'revert works (commit)' ' git add -i </dev/null >output && grep "unchanged *+3/-0 file" output ' +if test "$(git config core.filemode)" != false ; then test_expect_success 'patch does not affect mode' ' git reset --hard &&
@@ -84,5 +85,6 @@ test_expect_success 'stage mode but not hunk' ' git diff file | grep "+content" ' +fi test_done
--
1.5.5.1.354.g902c