Re: [PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2015, 18:23 UTC
- Message-ID
- <xmqqegha1oj6.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1443981977-64604-4-git-send-email-larsxschneider@gmail.com>
larsxschneider@gmail.com writes:
Show 9 quoted lines
> + 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?