From: Jeff King <peff@peff.net>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>
Subject: Re: [PATCH] Fix t3701 if core.filemode disabled
Date: Wed, 21 May 2008 10:36:07 -0400 [thread overview]
Message-ID: <20080521143607.GA3575@sigill.intra.peff.net> (raw)
In-Reply-To: <20080520215932.GB10437@steel.home>
On Tue, May 20, 2008 at 11:59:32PM +0200, Alex Riesen wrote:
> 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.
I don't think that is relevant here; this is a test script, and as such
is testing the results of the current version of git-init (from when we
git-init the trash directory).
That being said, I think the test you have is perfectly fine, and the
patch is correct.
And I am OK with the patch as-is, though I have a few style nits:
> @@ -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
1. It should be $(git config --bool core.filemode). As it happens,
git-init always uses the word "false" so this works OK, but it is
probably better to model good behavior and to be more robust.
2. It's a little hard to see which tests are affected. I would have done
something more like:
if test "$(git config --bool core.filemode)" = true
test_filemode=
else
test_filemode=:
fi
$test_filemode test_expect_success ...
But maybe that is just overengineering.
3. Usually when we skip tests we do something like
say 'skipping filemode tests (filesystem does not properly support modes')
-Peff
next prev parent reply other threads:[~2008-05-21 14:37 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 ` [PATCH] Fix t3701 " Alex Riesen
2008-05-21 14:36 ` Jeff King [this message]
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=20080521143607.GA3575@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
/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).