From: Petr Baudis <pasky@suse.cz>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: madduck@debian.org, git@vger.kernel.org
Subject: Re: [TopGit PATCH] tg patch: disable pager and colors for git-diff
Date: Thu, 20 Nov 2008 16:07:54 +0100 [thread overview]
Message-ID: <20081120150754.GH10491@machine.or.cz> (raw)
In-Reply-To: <2c6b72b30811200655o770efd63u4101f44683f2bc0d@mail.gmail.com>
On Thu, Nov 20, 2008 at 03:55:47PM +0100, Jonas Fonseca wrote:
> On Thu, Nov 20, 2008 at 15:34, Petr Baudis <pasky@suse.cz> wrote:
> > On Thu, Nov 20, 2008 at 02:57:10PM +0100, Jonas Fonseca wrote:
> >> When output is not redirected to a file, git brings up the pager for
> >> only the diff, which can be confusing, so disable with --no-pager.
> >> git-diff is a porcelain command and thus subject to color options. Use
> >> --no-color, to avoid the patch being corrupted with terminal escape
> >> characters when color.diff=always.
> >>
> >> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> >
> > I still don't understand how did that color thing happen - shouldn't
> > git diff avoid spewing out colors when the output is not a tty? And when
> > it is, I want the colors myself, too.
>
> As I wrote in the commit message, git diff always spews out colors
> with color.diff=always. This was what I for experimental reasons had
> in my .git/config (and forgotten all about) before sending the README
> update patch. Topgit could check the git color configuration but that
> seems more hacky.
This shows just that color.diff=always is asking for trouble. ;-)
I think we shouldn't try to outsmart the user if they _force_ that they
really always want the colors.
--
Petr "Pasky" Baudis
People who take cold baths never have rheumatism, but they have
cold baths.
prev parent reply other threads:[~2008-11-20 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 13:51 [TopGit PATCH] README: Fix spelling Jonas Fonseca
2008-11-20 13:52 ` Jonas Fonseca
2008-11-20 14:17 ` martin f krafft
2008-11-20 14:23 ` Jonas Fonseca
2008-11-20 13:57 ` [TopGit PATCH] tg patch: disable pager and colors for git-diff Jonas Fonseca
2008-11-20 14:34 ` Petr Baudis
2008-11-20 14:55 ` Jonas Fonseca
2008-11-20 15:07 ` Petr Baudis [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=20081120150754.GH10491@machine.or.cz \
--to=pasky@suse.cz \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=madduck@debian.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