Re: [PATCH] Add color to git-add--interactive diffs (Total different idea to solve the problem)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Tom Tobin <korpios@...>, Dan Zwell <dzwell@...>, Jonathan del Strother <maillist@...>, Shawn O. Pearce <spearce@...>, Git Mailing List <git@...>
Date: Tuesday, October 23, 2007 - 1:34 am

On Tue, Oct 23, 2007 at 12:55:44AM +0100, Johannes Schindelin wrote:

I didn't mean git-diff here, instead I meant diff, so no coloring involved
on the diff side. The git-apply would be enhanced to do the coloring on
every diff it gets on its STDIN.

In the git-add -i case, the perl script whould do something along these
lines:

	foreach my $file (@files) {
		# read in the diff of a file *WITHOUT* using color
		@diff = `git-diff-files $file`;

		# ... store it away for later use in hunk selection ...


		# print out a nice colored diff for the user
		`echo @diff | git apply --color`
	}

Instead of handcoding the colorization in the git-add--interactive perl
script, just enhance git-apply to do the colorization *after the fact* for
you on _any_ patch you throw at it in its STDIN.

-Peter
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Add color to git-add--interactive diffs (Total d..., Johannes Schindelin, (Mon Oct 22, 7:55 pm)
Re: [PATCH] Add color to git-add--interactive diffs (Total d..., Peter Baumann, (Tue Oct 23, 1:34 am)
Re: [PATCH] Add color to git-add--interactive diffs (Total d..., Johannes Schindelin, (Tue Oct 23, 7:13 am)
Re: [PATCH] Add color to git-add--interactive diffs (Take 2:..., Johannes Schindelin, (Sun Oct 14, 1:15 pm)