Re: [PATCH] Allow git-diff exit with codes similar to diff(1)

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

 



On 3/14/07, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> But we have isatty in setup_pager, so this works properly.

The problem is test cases. I think that we pipe the output of the test
case _anyway_, so the isatty() call is helping us there.

If we did not (this applies to test cases _outside_ of Git, too), then a
simple

        git diff bla || exit

would not work as expected. Even worse, as long as it is piped somewhere,
even cat, it works. But once you no longer pipe it (to get the nice pager,
for example), it stops working.

We have "PAGER=cat" in test-lib.sh which just disables pager,
so gits tests do not have the problem (maybe it was disabled just
because of this?). And if someone has own tests _with_ pager active
the one better be aware of what the one doing.
-
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]