Subject: Re: kompare won't parse git diffs

From: Andy Parkins <[email-masked]>
Date: Wed, 2 Aug 2006 19:18:58 +0100

On Wednesday 2006, August 02 18:19, Linus Torvalds wrote:

> I'd definitely call this a pure kompare bug.

Me too, but it seemed such a small thing change to git that I thought I'd 
mention it.

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

The only three things I checked were diff, git and subversion.  git is the 
only one of the three that didn't include anything after the filenames.  
Subversion uses the space to write (working copy) and (revision XXX), so it's 
clear that these fields are simply being treated as commentary.  That only 
adds weight to the argument that it is a kompare bug, as surely <nil> is a 
perfectly acceptable comment?

> 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

As it seems to be acceptable to put something other than a date, perhaps the 
hash of the object being compared would be more useful than the unavailable 
date?

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

I'm sure that that is true.  I certainly don't think that there is a fight 
here, I've not seen any feedback on the kompare bug yet, but I'd be very 
surprised if the response is "git is stupid - WONTFIX".

> 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

I think in the cases I've been testing, the extended format hasn't shown its 
face.  I used git-svnimport to duplicate an svn repository then copied the 
same changes into both an svn working directory and a git working directory.  
I then ran "git diff" and "svn diff", and diffed the two outputs.  Apart from 
some differences in how many lines where added and deleted (and the 
difference that started this thread of course) the two diffs were equivalent.

Andy

-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
[email-masked]