path: root/git-add--interactive.perl
diff options
authorJeff King <>2008-01-06 04:24:09 (GMT)
committerJunio C Hamano <>2008-01-07 02:41:44 (GMT)
commit50e3d1eeffefc8af58dbcf2ec79978ea375392b4 (patch)
treedb6149e4a38be4a1646037a01c5d0ab5dcc670e6 /git-add--interactive.perl
parenta0393ef67679ea7720290bd45d9d628920df59f3 (diff)
add--interactive: remove unused diff colors
When color support was added, we colored the diffs ourselves. However, 4af756f3 changed this to simply run "git diff-files" twice, keeping the colored output separately. This makes the internal diff color variables obsolete with one exception: when splitting hunks, we have to manually recreate the fragment for each part of the split. Thus we keep $fraginfo_color around to do that correctly. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git-add--interactive.perl')
1 files changed, 1 insertions, 5 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 0cdd800..54f1994 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -6,7 +6,7 @@ use Git;
# Prompt colors:
my ($prompt_color, $header_color, $help_color, $normal_color);
# Diff colors:
-my ($new_color, $old_color, $fraginfo_color, $metainfo_color, $whitespace_color);
+my ($fraginfo_color);
my ($use_color, $diff_use_color);
my $repo = Git->repository();
@@ -26,11 +26,7 @@ if ($use_color) {
# Do we also set diff colors?
$diff_use_color = $repo->get_colorbool('color.diff');
if ($diff_use_color) {
- $new_color = $repo->get_color("", "green");
- $old_color = $repo->get_color("color.diff.old", "red");
$fraginfo_color = $repo->get_color("color.diff.frag", "cyan");
- $metainfo_color = $repo->get_color("color.diff.meta", "bold");
- $whitespace_color = $repo->get_color("color.diff.whitespace", "normal red");