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

Re: [PATCH v2] add: check color.ui for interactive add

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 12, 2023, 17:09 UTC
Message-ID
<xmqqlegoboa3.fsf@gitster.g>
In-Reply-To
<a76a91a0-cefe-807f-f1f6-4a277d724630@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 10 quoted lines
>>       -+	*** Commands ***
>>       -+	  1: [s]tatus	  2: [u]pdate	  3: [r]evert	  4: [a]dd untracked
>>       -+	  5: [p]atch	  6: [d]iff	  7: [q]uit	  8: [h]elp
>>...
> ... The reason is that we're no-longer testing that we
> add "[]" around the text that would have been highlighted if color was
> enabled. That is with --color we print "1: status" with the "s"
> highlighted rather than "1: [s]tatus". So while the revised patch
> tests there is no color in the output, it does not test that we print
> the output correctly in that case.
Interesting.

My understanding was that the new test is about when coloring gets triggered (namely, does the configuration variable set to false disable the coloring?), and we had test coverage about how coloring affects the output elsewhere (hence this one does not have to test the same thing).

Previous: Derrick StoleeNext: Derrick Stolee
Message 9 of 12 in “add: check color.ui for interactive add”
  1. add: check color.ui for interactive addDerrick Stolee via GitGitGadget, Jun 5, 2023
  2. Junio C HamanoJun 6, 2023
  3. Junio C HamanoJun 6, 2023
  4. Jeff KingJun 6, 2023
  5. Derrick StoleeJun 6, 2023
  6. add: check color.ui for interactive addDerrick Stolee via GitGitGadget, Jun 6, 2023
  7. Phillip WoodJun 7, 2023
  8. Derrick StoleeJun 7, 2023
  9. Junio C HamanoJun 12, 2023
  10. 2/2 add: test use of brackets when color is disabledDerrick Stolee, Jun 7, 2023
  11. Phillip WoodJun 7, 2023
  12. Junio C HamanoJun 12, 2023

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.