Re: [PATCH v2] add: check color.ui for interactive add
- From
- Phillip 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