Potential bug in --color-words output

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

 



Hello,

Given an initial file with the contents "not to be", which I then change to "to be", the output of 'git diff --color-words', is

  notto be

with the first three letters colored red. To me this seems incorrect as it implies, or at least misleadingly suggests, that there was no space between "not" and "to" in the original file. (Even though in that case the output is actually "nottoto be" with the "notto" in red and "to" in green.)

If instead I start with a file with contents "to be", which I then change to "not to be", then the output is as expected:

  not to be

(First three letters colored green.)

Am I correct in seeing this as a bug? If so, any tips on what parts of diff.c to look at when starting a patch?

Thanks,

Simeon




[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