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

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

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Jun 7, 2023, 11:09 UTC
Message-ID
<a76a91a0-cefe-807f-f1f6-4a277d724630@gmail.com>
In-Reply-To
<pull.1541.v2.git.1686061219078.gitgitgadget@gmail.com>
Hi Stolee
Hi Stolee
Thanks for fixing this
On 06/06/2023 15:20, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <derrickstolee@github.com>
 >
Show 17 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
>       -+	What now> status        - show paths with changes
>       -+	update        - add working tree state to the staged set of changes
>       -+	revert        - revert staged set of changes back to the HEAD version
>       -+	patch         - pick hunks and update selectively
>       -+	diff          - view diff between HEAD and index
>       -+	add untracked - add contents of untracked files to the staged set of changes
>       -+	*** 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
>       -+	What now> Bye.
>       -+	EOF
>       -+	test_cmp expect actual
>       ++	test_cmp actual.raw actual
>        +'

I know Junio suggested this change, but I'm in two minds as to whether it is a good idea. 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.

Best Wishes
Phillip
Previous: Derrick Stolee via GitGitGadgetNext: Derrick Stolee
Message 7 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.