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

Re: fast-import deltas

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 1, 2014, 17:38 UTC
Message-ID
<20140401173856.GC6851@google.com>
In-Reply-To
<xmqqk3b90y79.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> Assuming that you do have and are willing to read the original file,
> you have three possible (and one impractical) approaches:
[...]
>  - Apply the foreign changes to the original file yourself, and feed
>    the resulting content to fast-import in full, letting fast-import
>    convert into the format Git understands.

This (when importing from Subversion) was the motivation for introducing fast-import's cat-blob command, for what it's worth.

[...]
> In short, the most practical solution would be to reconstitute a
> full object and feed that to fast-import, unless you already have
> xdelta or you can turn your foreign change into xdelta without ever
> looking at the original.

If your delta format happens to be similar enough to xdelta, then streaming in deltas in xdelta format does sound like a neat trick.

Maybe it would be useful to provide a micro-library that creates and validates xdelta opcodes for fast-import frontends to use.

Jonathan
Previous: Junio C HamanoNext: Mike Hommey
Message 7 of 13 in “fast-import deltas”
  1. Mike HommeyApr 1, 2014
  2. Jeff KingApr 1, 2014
  3. Mike HommeyApr 1, 2014
  4. Jeff KingApr 1, 2014
  5. Mike HommeyApr 1, 2014
  6. Junio C HamanoApr 1, 2014
  7. Jonathan NiederApr 1, 2014
  8. Mike HommeyApr 1, 2014
  9. Junio C HamanoApr 1, 2014
  10. Mike HommeyApr 1, 2014
  11. Max HornApr 1, 2014
  12. Mike HommeyApr 2, 2014
  13. Felipe ContrerasApr 9, 2014

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.