* [QUESTION] '--color-words' for 'git add -p'?
@ 2011-04-29 16:42 Valentin Haenel
2011-04-29 22:38 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Valentin Haenel @ 2011-04-29 16:42 UTC (permalink / raw)
To: Git-List
Hi,
is it possible to use some kind of magic to get 'git add -p' to display
diff with '--color-words' option? I tried GIT_DIFF_OPTS but w/o success.
thx
V-
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [QUESTION] '--color-words' for 'git add -p'?
2011-04-29 16:42 [QUESTION] '--color-words' for 'git add -p'? Valentin Haenel
@ 2011-04-29 22:38 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2011-04-29 22:38 UTC (permalink / raw)
To: Valentin Haenel; +Cc: Git-List
On Fri, Apr 29, 2011 at 06:42:10PM +0200, Valentin Haenel wrote:
> is it possible to use some kind of magic to get 'git add -p' to display
> diff with '--color-words' option? I tried GIT_DIFF_OPTS but w/o success.
No, it's not currently. The output of --color-words cannot be applied as
a patch, so we would have to do something like diff an extra time, match
up the hunks, show the user one hunk, and then apply the other.
In fact, that is what we already do to get color at all. It works very
well there, since we know the hunks will match exactly. I'm not 100%
sure, though, that color-words will produce exactly the same set of
hunks that a regular line-oriented diff will. Which would be a problem.
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-29 22:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 16:42 [QUESTION] '--color-words' for 'git add -p'? Valentin Haenel
2011-04-29 22:38 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).