]> git.ipfire.org Git - thirdparty/git.git/commit - add-interactive.c
add -i (built-in): prevent the `reset` "color" from being configured
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 11 Nov 2020 12:28:18 +0000 (12:28 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Nov 2020 17:07:53 +0000 (09:07 -0800)
commitc62cd1720f5c9cf57955a78576ba7e862b7352e6
tree6af8f1bed82edbaa480ef6acc168f659818c74a5
parent6f1a5caa0b69278bc7eb79d3474a1e881bd0c663
add -i (built-in): prevent the `reset` "color" from being configured

The Perl version of that command sneakily uses `git config --get-color`
to figure out the ANSI sequence to reset the color, but passes the empty
string and therefore cannot actually match any config entry.

This was missed when re-implementing the command as a built-in command.
Let's fix this, preventing the `reset` sequence from being overridden
via the config.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
add-interactive.c