Subject: Re: fast-import deltas

From: Jonathan Nieder <[email-masked]>
Date: Tue, 1 Apr 2014 10:38:56 -0700

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