Re: [PATCH 1/4] fix bsd shell negation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> 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?



    
    
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux