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

Re: fast-import deltas

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2014, 22:32 UTC
Message-ID
<xmqqlhvoy92m.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140401221003.GA5923@glandium.org>
Mike Hommey <mh@glandium.org> writes:
Show 12 quoted lines
> On Tue, Apr 01, 2014 at 10:14:02AM -0700, Junio C Hamano wrote:
> ...
>> Unless you already have your change in the xdelta on hand, or the
>> format your foreign change is in gives sufficient information to
>> produce a corresponding xdelta without looking at the content that
>> your foreign change applies to, it is silly to try to convert your
>> foreign change into xdelta and feed it to fast-import.
>
> The patch format I'm getting from mercurial boils down to:
>   - replace N bytes from offset in the source material with the given
>     M bytes.
> Which can easily be converted to xdelta without looking at the original.

If that is the case, and if you can identify the original in a way fast-import can understand, it might be interesting [*1*] to add support for accepting <base object, xdelta> pair in place of blob data, as Jonathan already hinted earlier.

It would not be sufficient for the receiving fast-import to store the delta data to its output---it needs to make sure that the base object is stored in the same output file as well, but that should not be too complicated.

[Footnote]

*1* I am still not sure how useful the feature would be outside slurping from Hg and Git---for obvious reasons, though. As long as the change is to a cleanly isolated codepath, it would be OK, I guess.

Previous: Mike HommeyNext: Mike Hommey
Message 9 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.