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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jan 5, 2008 at 23:24 UTC
50e3d1eeffefc8af58dbcf2ec79978ea375392b4
1 file changed
+1
-5
git-add--interactive.perl
+1
-5
@@ -6,7 +6,7 @@ use Git;
6
# Prompt colors:
7
my ($prompt_color, $header_color, $help_color, $normal_color);
8
# Diff colors:
9
-my ($new_color, $old_color, $fraginfo_color, $metainfo_color, $whitespace_color);
9
+my ($fraginfo_color);
10
11
my ($use_color, $diff_use_color);
12
my $repo = Git->repository();
@@ -26,11 +26,7 @@ if ($use_color) {
26
# Do we also set diff colors?
27
$diff_use_color = $repo->get_colorbool('color.diff');
28
if ($diff_use_color) {
29
- $new_color = $repo->get_color("color.diff.new", "green");
30
- $old_color = $repo->get_color("color.diff.old", "red");
29
$fraginfo_color = $repo->get_color("color.diff.frag", "cyan");
32
- $metainfo_color = $repo->get_color("color.diff.meta", "bold");
33
- $whitespace_color = $repo->get_color("color.diff.whitespace", "normal red");
30
}
31
}
32