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

Re: diff'ing files ...

From
Jeff King <peff@peff.net>
Date
Jun 7, 2011, 22:19 UTC
Message-ID
<20110607221948.GA10104@sigill.intra.peff.net>
In-Reply-To
<BANLkTinwSembzVk4gSYSvsRdHhDfqizkyg@mail.gmail.com>
On Tue, Jun 07, 2011 at 10:12:35PM +0000, Albretch Mueller wrote:
Show 6 quoted lines
> > ... binary diffs, though I don't know offhand the details of the algorithm.
> ~
>  this is the part that I need ;-)
> ~
>  Reading the source code without knowing the basic underlying
> ideas/algorithm (just an outline if possible) won't help much
You could read the comments in the source:
  $ head -n 7 diff-delta.c
  /*
   * diff-delta.c: generate a delta between two buffers
   *
   * This code was greatly inspired by parts of LibXDiff from Davide Libenzi
   * http://www.xmailserver.org/xdiff-lib.html
   *
   * Rewritten for GIT by Nicolas Pitre <nico@fluxnic.net>, (C) 2005-2007
According to the xdiff page linked:
  For binary files, LibXDiff implements both (with some modification)
  the algorithm described in File System Support for Delta Compression
  by Joshua P.  MacDonald, and the algorithm described in Fingerprinting
  By Random Polynomials by Michael O. Rabin.

Nicolas (cc'd) might be able to say what, if any, substantive changes were made from those works.

-Peff
Previous: Albretch MuellerNext: Nicolas Pitre
Message 4 of 8 in “diff'ing files ...”
  1. Albretch MuellerJun 6, 2011
  2. Jeff KingJun 6, 2011
  3. Albretch MuellerJun 7, 2011
  4. Jeff KingJun 7, 2011
  5. Nicolas PitreJun 10, 2011
  6. Jakub NarebskiJun 10, 2011
  7. Nicolas PitreJun 10, 2011
  8. Albretch MuellerJun 12, 2011

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.