git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFH] xdiff shows trivially redundant diff.

From
DLDavide Libenzi <davidel@xmailserver.org>
Date
Apr 3, 2006, 22:50 UTC
Message-ID
<Pine.LNX.4.64.0604031548150.30048@alien.or.mcafeemobile.com>
In-Reply-To
<7vbqvictsc.fsf@assigned-by-dhcp.cox.net>
On Mon, 3 Apr 2006, Junio C Hamano wrote:
Show 24 quoted lines
> Davide Libenzi <davidel@xmailserver.org> writes:
>
>>> 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
Previous: Junio C HamanoNext: Davide Libenzi
Message 15 of 17 in “[RFH] xdiff shows trivially redundant diff.”
  1. Junio C HamanoApr 2, 2006
  2. Davide LibenziApr 2, 2006
  3. Junio C HamanoApr 2, 2006
  4. Linus TorvaldsApr 2, 2006
  5. Davide LibenziApr 2, 2006
  6. Davide LibenziApr 2, 2006
  7. Linus TorvaldsApr 3, 2006
  8. Davide LibenziApr 3, 2006
  9. Linus TorvaldsApr 3, 2006
  10. Davide LibenziApr 3, 2006
  11. Junio C HamanoApr 3, 2006
  12. Davide LibenziApr 3, 2006
  13. Davide LibenziApr 3, 2006
  14. Junio C HamanoApr 3, 2006
  15. Davide LibenziApr 3, 2006
  16. Davide LibenziApr 3, 2006
  17. Junio C HamanoApr 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.