Re: [RFH] xdiff shows trivially redundant diff.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFH] xdiff shows trivially redundant diff.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:23

Davide Libenzi [off-list ref] writes:
quoted hunk
quoted
For example, the first hunk says:

	@@ -0,0 +6 @@
       +#include "diff.h"

Which is inconsistent with what GNU diff says:

	@@ -5,0 +6 @@
       +#include "diff.h"

I've tried this patch but...
The fix is fine, but you should do the same even in the s2 case. The
correct hunk should have been:
@@ -6,0 +6 @@
You are right.  GNU says -5,0 not -6,0 so presumably "patch"
other people use expect it to say -5,0 not -6,0; even though we
could argue the insertion happens at 6th position and saying
-6,0 is more logical, it does not matter -- what incumbent does
wins X-<.  I notice that your fix shows -5,0 to match it ;-).

Thanks for the fix.

Re: [RFH] xdiff shows trivially redundant diff.

From: Davide Libenzi <hidden>
Date: 2016-06-15 22:42:23

On Mon, 3 Apr 2006, Junio C Hamano wrote:
Davide Libenzi [off-list ref] writes:
quoted
quoted
For example, the first hunk says:

	@@ -0,0 +6 @@
       +#include "diff.h"

Which is inconsistent with what GNU diff says:

	@@ -5,0 +6 @@
       +#include "diff.h"

I've tried this patch but...
The fix is fine, but you should do the same even in the s2 case. The
correct hunk should have been:
@@ -6,0 +6 @@
You are right.  GNU says -5,0 not -6,0 so presumably "patch"
other people use expect it to say -5,0 not -6,0; even though we
could argue the insertion happens at 6th position and saying
-6,0 is more logical, it does not matter -- what incumbent does
wins X-<.  I notice that your fix shows -5,0 to match it ;-).
Yeah, I had to make it such that GNU patch could swallow it, otherwise it 
made no sense (being it right or not). Even the other issue is fixed now, 
and I'll send you a libxdiff-based diff as soon as it passes some tests.



- Davide
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help