author | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 08:50:23 +0000 (00:50 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 6 Dec 2007 01:57:11 +0000 (17:57 -0800) | ||
commit | b4c61ed6d35ea00494f953a27abbc902617972ec | |
tree | 0ee424fef1c4fd361445d6de9d8d4c46ae762aad | tree | snapshot |
parent | 0f6f5a4022de5904926cd528c681468e3f635256 | commit | diff |
Color support for "git-add -i"
This is mostly lifted from earlier series by Dan Zwell, but updated to
use "git config --get-color" and "git config --get-colorbool" to make it
simpler and more consistent with commands written in C.
A new configuration color.interactive variable is like color.diff and
color.status, and controls if "git-add -i" uses color.
A set of configuration variables, color.interactive.<slot>, are used to
define what color is used for the prompt, header, and help text.
For perl scripts, Git.pm provides $repo->get_color() method, which takes
the slot name and the default color, and returns the terminal escape
sequence to color the output text. $repo->get_colorbool() method can be
used to check if color is set to be used for a given operation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is mostly lifted from earlier series by Dan Zwell, but updated to
use "git config --get-color" and "git config --get-colorbool" to make it
simpler and more consistent with commands written in C.
A new configuration color.interactive variable is like color.diff and
color.status, and controls if "git-add -i" uses color.
A set of configuration variables, color.interactive.<slot>, are used to
define what color is used for the prompt, header, and help text.
For perl scripts, Git.pm provides $repo->get_color() method, which takes
the slot name and the default color, and returns the terminal escape
sequence to color the output text. $repo->get_colorbool() method can be
used to check if color is set to be used for a given operation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | diff | blob | history | |
git-add--interactive.perl | diff | blob | history | |
perl/Git.pm | diff | blob | history |