Re: [PATCH/RFC] "color.diff = true" is not "always" anymore.
- From
Jeff King <peff@peff.net>
- Date
- Dec 1, 2007, 04:15 UTC
- Message-ID
- <20071201041549.GB30725@coredump.intra.peff.net>
- In-Reply-To
- <7v4pf39m4j.fsf@gitster.siamese.dyndns.org>
On Fri, Nov 30, 2007 at 06:36:44PM -0800, Junio C Hamano wrote:
Show 8 quoted lines
> > It would be nice to have a "git config --colorbool" option, but it has > > the unfortunate problem that the stdout of "git config" is piped back to > > the caller, so the isatty check is meaningless (and the "pager in use" > > is similarly tricky). Perhaps it should go in Git.pm, so it at least > > only needs to be written once. > > About the isatty(3) check, you do not have to use the stdout to report > the result, though. IOW, you could use the exit code from the command.
I thought about that, but it feels a little wrong since it is so unlike all of the other interfaces to git-config. Still, I would consider doing it if there weren't other issues (like knowing when a pager is in use). At some point it becomes more complex than simply having the 5-10 lines necessary to do the check in perl.
-Peff