git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* t3701 fails if core.filemode disabled
@ 2008-05-18 15:23 Alex Riesen
  2008-05-18 15:35 ` Johannes Schindelin
  2008-05-18 19:08 ` Jeff King
  0 siblings, 2 replies; 15+ messages in thread
From: Alex Riesen @ 2008-05-18 15:23 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jeff King

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---

This is on Cygwin, yes. I have the core.filemode disabled in
~/.gitconfig. How about stopping the test before the failing portion
(only the last two fail, below)?

$ ./t3701-add-interactive.sh -d -v
...
* expecting success:
        git reset --hard &&
        echo content >>file &&
        chmod +x file &&
        printf "n\\ny\\n" | git add -p &&
        git show :file | grep content &&
        git diff file | grep "new mode"

HEAD is now at ddca8ca commit
ddca8caf8c92841fca6311cf3ee839dd304f353d
--
diff --git a/file b/file
index 180b47c..b6f2c08 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
 baseline
+content
Stage this hunk [y/n/a/d/?]?
* FAIL 9: patch does not affect mode

                git reset --hard &&
                echo content >>file &&
                chmod +x file &&
                printf "n\\ny\\n" | git add -p &&
                git show :file | grep content &&
                git diff file | grep "new mode"


* expecting success:
        git reset --hard &&
        echo content >>file &&
        chmod +x file &&
        printf "y\\nn\\n" | git add -p &&
        git diff --cached file | grep "new mode" &&
        git diff          file | grep "+content"

HEAD is now at ddca8ca commit
ddca8caf8c92841fca6311cf3ee839dd304f353d
--
diff --git a/file b/file
index 180b47c..b6f2c08 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
 baseline
+content
Stage this hunk [y/n/a/d/?]?
* FAIL 10: stage mode but not hunk

                git reset --hard &&
                echo content >>file &&
                chmod +x file &&
                printf "y\\nn\\n" | git add -p &&
                git diff --cached file | grep "new mode" &&
                git diff          file | grep "+content"


* failed 2 among 10 test(s)
$

 t/t3701-add-interactive.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index f15be93..976ef72 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -66,6 +66,8 @@ test_expect_success 'revert works (commit)' '
 	grep "unchanged *+3/-0 file" output
 '
 
+test "$(git config core.filemode)" = false && test_done
+
 test_expect_success 'patch does not affect mode' '
 	git reset --hard &&
 	echo content >>file &&
-- 
1.5.5.1.354.g902c

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-05-22 21:24 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-18 15:23 t3701 fails if core.filemode disabled Alex Riesen
2008-05-18 15:35 ` Johannes Schindelin
2008-05-18 17:04   ` Alex Riesen
2008-05-18 19:08 ` Jeff King
2008-05-18 20:01   ` Alex Riesen
2008-05-19 20:23     ` Alex Riesen
2008-05-19 20:55       ` Jeff King
2008-05-20 21:59         ` [PATCH] Fix t3701 " Alex Riesen
2008-05-21 14:36           ` Jeff King
2008-05-22 13:20             ` Alex Riesen
2008-05-22 17:49               ` Junio C Hamano
2008-05-22 17:55                 ` Jeff King
2008-05-22 21:22                 ` Alex Riesen
2008-05-19  0:17   ` t3701 fails " Mark Levedahl
2008-05-19  6:01     ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).