From: Junio C Hamano Date: Wed, 11 Jul 2012 23:30:28 GMT Subject: Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?) Message-ID: <7va9z5dgff.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vipdtdhla.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > I think the other tests in t/ prefer to unquote it so that we would > ignore spaces around "wc -l" output, i.e. > > test $(wc -l > Thanks for a report. -- >8 -- Subject: [PATCH] t1512: ignore whitespaces in wc -l output Some implementations of sed (e.g. MacOS X) have whitespaces in the output of "wc -l" that reads from the standard input. Ignore these whitespaces by not quoting the command substitution to be compared with the constant "16". Signed-off-by: Junio C Hamano --- t/t1512-rev-parse-disambiguation.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh index 3ed7558..1eb3514 100755 --- a/t/t1512-rev-parse-disambiguation.sh +++ b/t/t1512-rev-parse-disambiguation.sh @@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' ' # commits created by commit-tree in earlier tests do not share # the prefix. git rev-parse --disambiguate=000000000 >actual && - test "$(wc -l