author | Jeff King <peff@peff.net> | |
Fri, 4 Jan 2008 08:35:21 +0000 (03:35 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 7 Jan 2008 02:41:44 +0000 (18:41 -0800) | ||
commit | f87e310d2c53f412cf9ba0a04e06c974c17b9062 | |
tree | d0b09631c8e2c6f60365a6e9a31dcfba01dfb41a | tree | snapshot |
parent | 50e3d1eeffefc8af58dbcf2ec79978ea375392b4 | commit | diff |
add--interactive: allow diff colors without interactive colors
Users with color.diff set to true/auto will not see color in
"git add -i" unless they also set color.interactive.
This changes the semantics of color.interactive to control only the
coloring of the interaction aspect of the command and let color.diff
to control the color of hunk picker, which would arguably be more
convenient.
Old $use_color variable is now renamed to $menu_use_color to make it
clear that it is about coloring the interaction.
The "colored" subroutine now checks if the passed color is defined,
instead of checking $use_color variable, to decide if the lines should
be colored. The various variables that define colors for different
parts of the output are set or unset depending on the setting of
color.interactive and color.diff configuration variables.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Users with color.diff set to true/auto will not see color in
"git add -i" unless they also set color.interactive.
This changes the semantics of color.interactive to control only the
coloring of the interaction aspect of the command and let color.diff
to control the color of hunk picker, which would arguably be more
convenient.
Old $use_color variable is now renamed to $menu_use_color to make it
clear that it is about coloring the interaction.
The "colored" subroutine now checks if the passed color is defined,
instead of checking $use_color variable, to decide if the lines should
be colored. The various variables that define colors for different
parts of the output are set or unset depending on the setting of
color.interactive and color.diff configuration variables.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | diff | blob | history |