Re: [QUESTION] '--color-words' for 'git add -p'?

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

 



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
--
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]