git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: [PATCH] Fix t3701 if core.filemode disabled
Date: Tue, 20 May 2008 23:59:32 +0200	[thread overview]
Message-ID: <20080520215932.GB10437@steel.home> (raw)
In-Reply-To: <20080519205550.GA24246@sigill.intra.peff.net>

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Jeff King, Mon, May 19, 2008 22:55:50 +0200:
> On Mon, May 19, 2008 at 10:23:42PM +0200, Alex Riesen wrote:
> 
> > > I setting core.filemode _inside_ the test breaks it in exactly the
> > > same way (on Linux, I'm at home). I'll retest tomorrow
> > 
> > It 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

  reply	other threads:[~2008-05-20 22:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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         ` Alex Riesen [this message]
2008-05-21 14:36           ` [PATCH] Fix t3701 " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080520215932.GB10437@steel.home \
    --to=raa.lkml@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).