mbox series

[0/9] Fix color handling in git add -i

Message ID pull.785.git.1605051739.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series Fix color handling in git add -i | expand

Message

Han-Wen Nienhuys via GitGitGadget Nov. 10, 2020, 11:42 p.m. UTC
This patch series started out as a tiny fix for a bug reported in 
https://lore.kernel.org/git/313B8999-1E99-4695-A20D-E48840C30879@gmail.com/.
And then I only wanted to add a regression test to make sure that this does
not regress. And then I just wanted to ensure that it passes both with the
Perl version of git add -i as well as with the built-in version.

And in no time I was looking at a real patch series.

Johannes Schindelin (9):
  add -i (built-in): do show an error message for incorrect inputs
  add -i (built-in): send error messages to stderr
  add -i: use `reset_color` consistently
  add -i (built-in): prevent the `reset` "color" from being configured
  add -i (built-in): use correct names to load color.diff.* config
  add -p (built-in): do not color the progress indicator separately
  add -i (built-in): use the same indentation as the Perl version
  add -i (Perl version): include indentation in the colored header
  add -i: verify in the tests that colors can be overridden

 add-interactive.c          | 34 ++++++++++++++----------
 add-patch.c                | 14 +++++-----
 git-add--interactive.perl  |  6 ++---
 t/t3701-add-interactive.sh | 53 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 25 deletions(-)


base-commit: e4d83eee9239207622e2b1cc43967da5051c189c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-785%2Fdscho%2Ffix-add-i-colors-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-785/dscho/fix-add-i-colors-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/785

Comments

Jeff King Nov. 11, 2020, 2:36 a.m. UTC | #1
On Tue, Nov 10, 2020 at 11:42:10PM +0000, Johannes Schindelin via GitGitGadget wrote:

> This patch series started out as a tiny fix for a bug reported in 
> https://lore.kernel.org/git/313B8999-1E99-4695-A20D-E48840C30879@gmail.com/.
> And then I only wanted to add a regression test to make sure that this does
> not regress. And then I just wanted to ensure that it passes both with the
> Perl version of git add -i as well as with the built-in version.
> 
> And in no time I was looking at a real patch series.

OK, I see now why you wanted to roll my work in. There was quite a bit
more here than I expected. :)

> Johannes Schindelin (9):
>   add -i (built-in): do show an error message for incorrect inputs
>   add -i (built-in): send error messages to stderr
>   add -i: use `reset_color` consistently
>   add -i (built-in): prevent the `reset` "color" from being configured
>   add -i (built-in): use correct names to load color.diff.* config
>   add -p (built-in): do not color the progress indicator separately
>   add -i (built-in): use the same indentation as the Perl version
>   add -i (Perl version): include indentation in the colored header
>   add -i: verify in the tests that colors can be overridden

They all look good to me. I left some minor comments on the final patch.

-Peff