From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>, git@vger.kernel.org
Subject: Re: [PATCH] Make --color available to git-status
Date: Sun, 6 May 2007 16:53:43 -0400 [thread overview]
Message-ID: <20070506205343.GA9670@coredump.intra.peff.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0705051956200.4015@racer.site>
On Sat, May 05, 2007 at 07:58:45PM +0200, Johannes Schindelin wrote:
> AFAIR there have been attempts to enable this by default, when git-status
> is run interactively (i.e. its output is not piped). However, this proved
> to be remarkably complex, given that the output of runstatus _is_ piped.
I have been running with "status.color" set to "auto" for months, and it
works fine. git-status sends the output of runstatus to stdout; only
git-commit saves it in a file. However, that is irrelevant here since
git-commit explicitly turns off color anyway. The reason for this is
that the result ends up in the user's editor and in the commit object.
In the editor, it is more elegant to do syntax highlighting at that
level (otherwise you have to edit around the escape codes). For the
commit object, we would have to put in code to strip the colorization.
My biggest complaint is that git-commit shows the runstatus output to
the user if there is nothing to commit, but it isn't colorized (because
we created it with the intent of running the editor on it). This could
be fixed at the expense of slightly more CPU by simply re-running
runstatus instead of using the saved copy.
> IMHO the proper solution would be to go the full nine yards, and teach
> runstatus about the remaining parts of git-status. Then, automatic color
> works automatically.
When I rewrote runstatus in C, it was always my intent that it just be a
first step in turning git-status into a C builtin (with the ultimate
goal of improving the output by parallel walking the HEAD, index, and
working tree). Unfortunately, I don't seem to have gotten around to
it...
-Peff
prev parent reply other threads:[~2007-05-06 20:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-05 17:37 [PATCH] Make --color available to git-status Matthieu Moy
2007-05-05 17:58 ` Johannes Schindelin
2007-05-06 13:58 ` Matthieu Moy
2007-05-06 20:53 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070506205343.GA9670@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).