Re: kompare won't parse git diffs

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

 




On Wed, 2 Aug 2006, Andy Parkins wrote:
>
> Kompare just shows blank for diffs redirected from git. [ snip ]
> 
> As you can see, it's a simple addition of the line "blah".  Kompare shows this 
> diff as blank.  Now if I modify the file so that the "---" and "+++" lines 
> both have "<tab>(something)" added:

I'd definitely call this a pure kompare bug.

Not only is the git patch format perfectly standard and accepted by other 
tools, it's much better designed than the brain-damaged syntax that GNU 
patch uses (which adds a tab and a timestamp after the filenames). In 
particular, with git patches it is easy to get filenames that have spaces 
and tabs in them right. 

Now, if the kompare people can show that every single other patch 
generator adds the stupid tab + date format, I guess we could do it too, 
but
 (a) there is no valid date in general to use, so it's a fundamentally 
     broken notion and
 (b) I'm pretty sure that the kompare people only ever actually tested 
     with GNU patch or other very modern patches, because when I did the 
     patch apply logic (and designed the extended git format), I looked 
     around at things like "diffstat" that have been around a long time, 
     to see what they accept, and the whole thing is an unholy mess wrt 
     filenames.

The git format really is the best patch format I've seen by _far_, partly 
because it's designed to be totally unambiguous even in the presense of 
file renames (and new/deleted files, and file modes), but partly because 
it's also designed to be both extensible and detectable (ie the marker 
"diff --git " is there, so that you can _know_ and _depend_ on the git 
format, unlike, for example, the GNU patches that don't have a good fixed 
format).

I'm hoping that people will some day just wake up and notice that the git 
extended patches are really worth doing even for other projects. I was 
going to send in patches to GNU patch to try to make it at least 
understand them, but I got lazy.

		Linus

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