git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Zefram <zefram@fysh.org>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git bisect colour output contrary to configuration
Date: Fri, 29 Dec 2017 23:05:52 +0100	[thread overview]
Message-ID: <87zi616vgf.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20171229194712.GA15930@fysh.org>


On Fri, Dec 29 2017, zefram@fysh.org jotted:

> My ~/.gitconfig sets color.ui=never, which should prevent attempts
> at colouring output from all git commands.  I do not have any git
> configuration enabling colour in any situation (such as for specific
> commands).  But when a git bisect completes, the output identifying
> the first bad commit includes escape sequences to colour the "commit
> 3e6..." line yellow.  Excerpt of strace output (with many irrelevant
> lines omitted):
>
> 23851 write(1, "3e6fc602e433dbd76941ac0ef7a438a77fbe9a05 is the first bad commit\n", 65) = 65
> 23851 open("/home/zefram/.gitconfig", O_RDONLY) = 3
> 23851 read(3, "[user]\n\tname = Zefram\n\temail = zefram@fysh.org\n\tsigningkey = 0x8E1E1EC1\n\n[color]\n\tui = never\n", 4096) = 93
> 23851 write(1, "\33[33mcommit 3e6fc602e433dbd76941ac0ef7a438a77fbe9a05\33[m\n", 56) = 56
>
> Given the configuration, that line should be free of escape sequences.
>
> I'm mainly using git 2.1.4 via Debian, but I've also
> reproduced this problem with the latest from git.git (commit
> 1eaabe34fc6f486367a176207420378f587d3b48, tagged v2.16.0-rc0).

This issue is a bug, but has nothing do do with bisect per-se, but is a
bug in diff-tree, compare these two:

    git -c color.ui=never diff-tree --pretty --stat HEAD
    git -c color.ui=never show --pretty --stat HEAD

diff-tree will incorrectly show colored output here despite
ui.color=never.

  reply	other threads:[~2017-12-29 22:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-29 19:47 [BUG] git bisect colour output contrary to configuration Zefram
2017-12-29 22:05 ` Ævar Arnfjörð Bjarmason [this message]
2017-12-29 22:51   ` [PATCH] diff-tree: obey the color.ui configuration Ævar Arnfjörð Bjarmason
2017-12-29 23:16     ` Todd Zullinger
2017-12-30  1:55       ` Jeff King
2017-12-30 12:33         ` Ævar Arnfjörð Bjarmason
2017-12-30 14:45           ` Jeff King
2017-12-30 15:04             ` Ævar Arnfjörð Bjarmason
2017-12-30 18:15               ` Jeff King
2017-12-30 23:01                 ` Christian Couder

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zi616vgf.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=zefram@fysh.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).