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

Re: Use a *real* built-in diff generator

From
Linus Torvalds <torvalds@osdl.org>
Date
Mar 25, 2006, 15:36 UTC
Message-ID
<Pine.LNX.4.64.0603250734130.15714@g5.osdl.org>
In-Reply-To
<118833cc0603250544h289f385fo683ec7b40cdb0ed@mail.gmail.com>
On Sat, 25 Mar 2006, Morten Welinder wrote:
Show 8 quoted lines
>
> The primary correctness concern is that patch understands
> the output, ie., the libxdiff + patch brings out right back.
> 
> It ought to be fairly easy to script checking every file change
> that ever went into a git repository.  You won't cover evil
> cases that way, but it should provide some assurances that
> nothing is too wrong.

I did _some_ tests, and especially "git-apply" is very useful, since it is actually a lot more anal than regular "patch".

It all worked fine except for files that don't end with a newline. Davide points out that he just forces the EOLN at the end in his test harness, but that's not exactly acceptable for a real project that actually has real cases.

I'll be taking a look at trying to fix it. 
		Linus
Previous: Morten WelinderNext: Linus Torvalds
Message 10 of 22 in “Use a *real* built-in diff generator”
  1. Linus TorvaldsMar 25, 2006
  2. Junio C HamanoMar 25, 2006
  3. Junio C HamanoMar 25, 2006
  4. Linus TorvaldsMar 25, 2006
  5. Davide LibenziMar 25, 2006
  6. Marco CostalbaMar 25, 2006
  7. Alex RiesenMar 25, 2006
  8. Linus TorvaldsMar 25, 2006
  9. Morten WelinderMar 25, 2006
  10. Linus TorvaldsMar 25, 2006
  11. Linus TorvaldsMar 25, 2006
  12. Davide LibenziMar 25, 2006
  13. Linus TorvaldsMar 25, 2006
  14. Davide LibenziMar 26, 2006
  15. Ralf BaechleMar 26, 2006
  16. Petr BaudisMar 26, 2006
  17. Linus TorvaldsMar 25, 2006
  18. Davide LibenziMar 26, 2006
  19. Junio C HamanoMar 25, 2006
  20. Junio C HamanoMar 25, 2006
  21. Linus TorvaldsMar 25, 2006
  22. Linus TorvaldsMar 25, 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.