Re: [PATCH 1/4] fix bsd shell negation
- From
Junio C Hamano <junio@pobox.com>
- Date
- May 14, 2008, 02:27 UTC
- Message-ID
- <7viqxhr55h.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080513084452.GA23799@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> On some shells (notably /bin/sh on FreeBSD 6.1), the > construct > > ! foo | bar > > does not negate the exit value of the pipeline, but rather > of 'foo', producing the opposite of the expected value. We > can work around this by specifying it as > > ! (foo | bar)
After applying this patch, we still seem to have fair number of hits:
$ git grep -n -e '![^(]* |' -- '*.sh'
t/t5302-pack-index.sh:68: ! echo "$msg" | grep "pack too large .* off_t" t/t7002-grep.sh:111: ! git grep -c test $H | grep -q /dev/null t/t7600-merge.sh:378: if ! grep "^ file | *2 +-$" diffstat.txt t/t7600-merge.sh:392: if ! grep "^ file | *2 +-$" diffstat.txt t/t9400-git-cvsserver-server.sh:160: ! cat request-anonymous | t/t9400-git-cvsserver-server.sh:169: ! cat request-anonymous | t/t9400-git-cvsserver-server.sh:187: ! cat request-anonymous |
Didn't you have trouble with them, or the tests themselves are broken in some other way that these did not triggger?