git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Updated to v2.14.2 on macOS; git add --patch broken

From
Jeff King <peff@peff.net>
Date
Oct 3, 2017, 07:16 UTC
Message-ID
<20171003071622.el6zqibfyrjc2mra@sigill.intra.peff.net>
In-Reply-To
<xmqqinfwiu5n.fsf@gitster.mtv.corp.google.com>
On Tue, Oct 03, 2017 at 04:10:12PM +0900, Junio C Hamano wrote:
Show 18 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > I'd prefer not to revert. I think setting any of the color config to
> > "always" in an on-disk file is basically a broken config. It was
> > exacerbated by 4c7f1819b, but it was already broken for scripts that
> > call "git log" or "git diff", or even just something as simple as piping
> > those programs on the command line.
> 
> I actually disagree with that reasoning.
> 
> We've promised that plumbing commands were safe to use in scripts,
> and 4c7f1819 ("make color.ui default to 'auto'", 2013-06-10) got it
> closer to breaking it (but not quite), and 136c8c8b finally broke
> it.  Setting ui.color=always and shooting themselves in the foot by
> seeing ANSI escapes in "git log >file" output is totally user's
> choice.  Breaking scripts that carefully chose to use plumbing,
> believing our earlier promise, and blaming user's ui.color=always
> does not sound quite like the same thing, at least to me.

I agree it's not quite the same thing, and I agree the problem was made much worse by 4c7f1819b. But I still think color.ui=always is inherently a foot-gun, and in either case it is the user that sets it that is harmed (and they are the ones who have the power to fix it).

At any rate, I think you only need to agree with that reason to buy into my "do nothing" option.

Option 2 would make everybody happy, I think (I'm working up a patch, though note that it isn't quite trivial because of some abuses of the color system in the test scripts).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 42 in “Updated to v2.14.2 on macOS; git add --patch broken”
  1. Toni UebernickelSep 27, 2017
  2. Jeff KingSep 27, 2017
  3. Toni UebernickelSep 27, 2017
  4. Jeff KingSep 27, 2017
  5. Jonathan NiederSep 27, 2017
  6. Jonathan NiederSep 27, 2017
  7. Toni UebernickelSep 28, 2017
  8. Jeff KingSep 28, 2017
  9. Toni UebernickelSep 28, 2017
  10. Jonathan NiederOct 2, 2017
  11. Junio C HamanoOct 3, 2017
  12. Junio C HamanoOct 3, 2017
  13. Junio C HamanoOct 3, 2017
  14. Jeff KingOct 3, 2017
  15. Junio C HamanoOct 3, 2017
  16. Jeff KingOct 3, 2017
  17. Junio C HamanoOct 3, 2017
  18. Jeff KingOct 3, 2017
  19. Junio C HamanoOct 3, 2017
  20. Jeff KingOct 3, 2017
  21. Tsvi MostoviczOct 3, 2017
  22. Junio C HamanoOct 3, 2017
  23. Jeff KingOct 3, 2017
  24. 01/12 test-terminal: set TERM=vt100Jeff King, Oct 3, 2017
  25. 02/12 t4015: prefer --color to -c color.diff=alwaysJeff King, Oct 3, 2017
  26. 03/12 t4015: use --color with --color-movedJeff King, Oct 3, 2017
  27. 04/12 t3701: use test-terminal to collect color outputJeff King, Oct 3, 2017
  28. 05/12 t7508: use test_terminal for color outputJeff King, Oct 3, 2017
  29. 06/12 t7502: use diff.noprefix for --verbose testJeff King, Oct 3, 2017
  30. 07/12 t6006: drop "always" color config testsJeff King, Oct 3, 2017
  31. 08/12 t3203: drop "always" color testJeff King, Oct 3, 2017
  32. 09/12 t7301: use test_terminal to check colorJeff King, Oct 3, 2017
  33. 10/12 t3205: use --color instead of color.branch=alwaysJeff King, Oct 3, 2017
  34. 11/12 provide --color option for all ref-filter usersJeff King, Oct 3, 2017
  35. 12/12 color: make "always" the same as "auto" in configJeff King, Oct 3, 2017
  36. Junio C HamanoOct 4, 2017
  37. Jeff KingOct 5, 2017
  38. Jan PrachařOct 20, 2017
  39. Jeff KingOct 3, 2017
  40. 0/2 fixing "add -p" regressionJunio C Hamano, Oct 3, 2017
  41. 1/2 Revert "color: check color.ui in git_default_config()"Junio C Hamano, Oct 3, 2017
  42. 2/2 colors: git_default_config() does not read color.uiJunio C Hamano, Oct 3, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.