Re: What's in git.git (stable frozen)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 05, 2008 at 02:46:07AM -0800, Junio C Hamano wrote:

>  * Jeff's git-add--interactive change to always honor color.diff
>    regardless of color.interactive.
> 
>    I'd probably apply this, along with the patch to redefine
>    what color.interactive means.  "git am -i" could also learn
>    to use colors in the future.
> 
>    Incidentally I noticed that many of the color.diff.* palette
>    options are read by "git-add -i" but never used by the
>    script.  We might want to fix this while we are at it.

Here is the palette cleanup patch, on top of my others (it should still
be done even if the other patches aren't taken, but backporting it
should be fairly obvious).

-- >8 --
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@xxxxxxxx>
---
 git-add--interactive.perl |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index aaa9b24..5bdcca8 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();
@@ -27,11 +27,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("color.diff.new", "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");
 }
 
 sub colored {
-- 
1.5.4.rc2.1147.gaecdf-dirty

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux