From: Junio C Hamano <gitster@pobox•com>
To: Jonathan Nieder <jrnieder@gmail•com>
Cc: Toni Uebernickel <tuebernickel@gmail•com>,
git@vger•kernel.org, Tsvi Mostovicz <ttmost@gmail•com>,
Jeff King <peff@peff•net>
Subject: Re: Updated to v2.14.2 on macOS; git add --patch broken
Date: Tue, 03 Oct 2017 12:14:00 +0900 [thread overview]
Message-ID: <xmqqefqkly87.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqinfxklw7.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Tue, 03 Oct 2017 11:25:44 +0900")
Junio C Hamano <gitster@pobox•com> writes:
> In any case, I think the first step may be to revert 136c8c8b from
> both 'master' and 2.14.x. These alternative solutions can come on
> top.
>
> Thoughts?
With the attached patch, after reverting 136c8c8b ("color: check
color.ui in git_default_config()", 2017-07-13) from the tip of
'master', all tests seem to pass. More importantly,
git -c color.ui=always diff-files -p >not-a-tty
will not get colors on its output file, because it does not pay
attention to color.ui configuration.
Note that I haven't _decided_ that reverting is the best way to move
forward (yet). I am just giving a datapoint for people to use when
they assess how painful each possible avenues proposed are.
builtin/for-each-ref.c | 3 ++-
builtin/tag.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 5d7c921a77..238eb00e09 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -5,6 +5,7 @@
#include "object.h"
#include "parse-options.h"
#include "ref-filter.h"
+#include "color.h"
static char const * const for_each_ref_usage[] = {
N_("git for-each-ref [<options>] [<pattern>]"),
@@ -54,7 +55,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
format.format = "%(objectname) %(objecttype)\t%(refname)";
- git_config(git_default_config, NULL);
+ git_config(git_color_default_config, NULL);
parse_options(argc, argv, prefix, opts, for_each_ref_usage, 0);
if (maxcount < 0) {
diff --git a/builtin/tag.c b/builtin/tag.c
index c627794181..f8bc1393ed 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -158,7 +158,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
if (starts_with(var, "column."))
return git_column_config(var, value, "tag", &colopts);
- return git_default_config(var, value, cb);
+ return git_color_default_config(var, value, cb);
}
static void write_tag_body(int fd, const struct object_id *oid)
next prev parent reply other threads:[~2017-10-03 3:14 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 13:23 Updated to v2.14.2 on macOS; git add --patch broken Toni Uebernickel
2017-09-27 17:07 ` Jeff King
2017-09-27 17:28 ` Toni Uebernickel
2017-09-27 18:01 ` Jeff King
2017-09-27 19:51 ` Jonathan Nieder
2017-09-27 19:53 ` Jonathan Nieder
2017-09-28 5:03 ` Toni Uebernickel
2017-09-28 5:20 ` Jeff King
2017-09-28 5:31 ` Toni Uebernickel
2017-10-02 23:00 ` Jonathan Nieder
2017-10-03 1:18 ` Junio C Hamano
2017-10-03 2:25 ` Junio C Hamano
2017-10-03 3:14 ` Junio C Hamano [this message]
2017-10-03 6:15 ` Jeff King
2017-10-03 7:10 ` Junio C Hamano
2017-10-03 7:16 ` Jeff King
2017-10-03 8:34 ` Junio C Hamano
2017-10-03 8:45 ` Jeff King
2017-10-03 8:56 ` Junio C Hamano
2017-10-03 9:10 ` Jeff King
2017-10-03 9:18 ` Tsvi Mostovicz
2017-10-03 10:38 ` Junio C Hamano
2017-10-03 13:37 ` Jeff King
2017-10-03 13:39 ` [PATCH 01/12] test-terminal: set TERM=vt100 Jeff King
2017-10-03 13:40 ` [PATCH 02/12] t4015: prefer --color to -c color.diff=always Jeff King
2017-10-03 13:41 ` [PATCH 03/12] t4015: use --color with --color-moved Jeff King
2017-10-03 13:42 ` [PATCH 04/12] t3701: use test-terminal to collect color output Jeff King
2017-10-03 13:43 ` [PATCH 05/12] t7508: use test_terminal for " Jeff King
2017-10-03 13:43 ` [PATCH 06/12] t7502: use diff.noprefix for --verbose test Jeff King
2017-10-03 13:44 ` [PATCH 07/12] t6006: drop "always" color config tests Jeff King
2017-10-03 13:44 ` [PATCH 08/12] t3203: drop "always" color test Jeff King
2017-10-03 13:44 ` [PATCH 09/12] t7301: use test_terminal to check color Jeff King
2017-10-03 13:45 ` [PATCH 10/12] t3205: use --color instead of color.branch=always Jeff King
2017-10-03 13:45 ` [PATCH 11/12] provide --color option for all ref-filter users Jeff King
2017-10-03 13:46 ` [PATCH 12/12] color: make "always" the same as "auto" in config Jeff King
2017-10-04 2:59 ` Updated to v2.14.2 on macOS; git add --patch broken Junio C Hamano
2017-10-05 10:06 ` Jeff King
2017-10-20 13:31 ` Jan Prachař
2017-10-03 9:31 ` Jeff King
2017-10-03 4:07 ` [PATCH 0/2] fixing "add -p" regression Junio C Hamano
2017-10-03 4:07 ` [PATCH 1/2] Revert "color: check color.ui in git_default_config()" Junio C Hamano
2017-10-03 4:07 ` [PATCH 2/2] colors: git_default_config() does not read color.ui Junio C Hamano
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=xmqqefqkly87.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=ttmost@gmail$(echo .)com \
--cc=tuebernickel@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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