From: Pete Wyckoff <pw@padd.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Users <git@vger.kernel.org>, Luke Diamand <luke@diamand.org>
Subject: Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X
Date: Sun, 4 Oct 2015 16:18:23 -0400 [thread overview]
Message-ID: <20151004201823.GA8366@padd.com> (raw)
In-Reply-To: <90C13A5C-AB19-4E5C-A317-15B3D182444D@gmail.com>
larsxschneider@gmail.com wrote on Sun, 04 Oct 2015 11:44 -0700:
>
> On 04 Oct 2015, at 11:23, Junio C Hamano <gitster@pobox.com> wrote:
>
> > larsxschneider@gmail.com writes:
> >
> >> + if test_have_prereq CYGWIN; then
> >> + : # NOOP
> >> + elif test_have_prereq DARWIN; then
> >> + stat -f %Sp text | egrep ^-r-- &&
> >> + stat -f %Sp text+x | egrep ^-r-x
> >> + else
> >> stat --format=%A text | egrep ^-r-- &&
> >> stat --format=%A text+x | egrep ^-r-x
> >> fi
> >
> > Not a new problem but why do we need "stat" here?
> >
> > Shouldn't "test -r", "! test -x", and their usual friends be
> > sufficient for the purpose of the test and are more portable?
>
> Good question. The stat call was introduced with df9c545 by Pete Wyckoff.
> @Pete, @Luke: Are you aware of any particular reason for stat?
I think you could do this all with test. The key is to make
sure the files are readable, not writable, and either executable
or not. Cygwin and darwin oddities were not on my radar 3 years ago.
See also 4cea4d6 (git p4 test: use test_chmod for cygwin,
2013-01-26) for the description I wrote about what this test is
trying to verify.
-- Pete
next prev parent reply other threads:[~2015-10-04 20:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-04 18:06 [PATCH v2 0/4] Add Travis CI support larsxschneider
2015-10-04 18:06 ` [PATCH v2 1/4] " larsxschneider
2015-10-05 9:43 ` Johannes Schindelin
2015-10-04 18:06 ` [PATCH v2 2/4] Add prereq to detect OS X larsxschneider
2015-10-04 18:28 ` Junio C Hamano
2015-10-04 18:46 ` Lars Schneider
2015-10-04 18:06 ` [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on " larsxschneider
2015-10-04 18:23 ` Junio C Hamano
2015-10-04 18:44 ` Lars Schneider
2015-10-04 20:18 ` Pete Wyckoff [this message]
2015-10-05 3:08 ` Torsten Bögershausen
2015-10-04 18:06 ` [PATCH v2 4/4] git-p4: Disable t9819 git-p4-case-folding test " larsxschneider
2015-10-04 18:26 ` Junio C Hamano
2015-10-04 18:38 ` Lars Schneider
2015-10-04 18:49 ` Junio C Hamano
2015-10-05 9:55 ` [PATCH v2 0/4] Add Travis CI support Johannes Schindelin
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=20151004201823.GA8366@padd.com \
--to=pw@padd.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
--cc=luke@diamand.org \
/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).