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

Re: RFC: New diff-delta.c implementation

From
Junio C Hamano <junkio@cox.net>
Date
Apr 22, 2006, 17:03 UTC
Message-ID
<7v3bg5k0ev.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<81E2B4A6-3591-418D-9448-47648AF4A687@adacore.com>
Geert Bosch <bosch@adacore.com> writes:
Show 11 quoted lines
> On Apr 22, 2006, at 08:51, Nicolas Pitre wrote:
>> First, pack-objects tries to find the best object combinations
>> producing the smallest delta.  Then there is a second pass
>> where the best delta are actually written out.  When that
>> message appears that means the delta size for the same object
>> pair does not match between those two passes.
>
> OK, thanks for that info. There are very few comments in the
> code, or specs of either the file format used, or
> for function arguments. I'll look a the code again with this
> info.

Initially I thought it would be irrelevant to your work, but generating packs is the only way to really exercise the diff-delta code these days; Documentation/technical/pack-format.txt might help.

> What is the exact role of the max_size parameter that is
> passed to diff_delta? I took it to mean return 0 if
> the size of the delta would be bigger than max_size and
> max_size is nonzero.

No, that is a _strong_ hint to tell diff_delta to quit early without wasting cycles if the result exceeds the given size, either because we already have a delta smaller than that, or because we expect to get an undeltified representation compressed down to that size. So if your algorithm cannot notice early stage of the processing if the result would exceed that max_size, just code things to ignore it first.

Previous: Geert BoschNext: Geert Bosch
Message 8 of 32 in “RFC: New diff-delta.c implementation”
  1. Geert BoschApr 21, 2006
  2. Nicolas PitreApr 22, 2006
  3. Geert BoschApr 22, 2006
  4. Junio C HamanoApr 22, 2006
  5. Geert BoschApr 22, 2006
  6. Nicolas PitreApr 22, 2006
  7. Geert BoschApr 22, 2006
  8. Junio C HamanoApr 22, 2006
  9. Geert BoschApr 22, 2006
  10. Junio C HamanoApr 22, 2006
  11. Nicolas PitreApr 22, 2006
  12. Geert BoschApr 22, 2006
  13. Junio C HamanoApr 22, 2006
  14. Nicolas PitreApr 22, 2006
  15. Davide LibenziApr 22, 2006
  16. Geert BoschApr 22, 2006
  17. Rene ScharfeApr 22, 2006
  18. Geert BoschApr 24, 2006
  19. Nicolas PitreApr 24, 2006
  20. Geert BoschApr 24, 2006
  21. Nicolas PitreApr 24, 2006
  22. Geert BoschApr 24, 2006
  23. Geert BoschApr 24, 2006
  24. Geert BoschApr 24, 2006
  25. Rutger NijlunsingApr 24, 2006
  26. Petr BaudisApr 24, 2006
  27. Geert BoschApr 24, 2006
  28. Rene ScharfeApr 25, 2006
  29. Davide LibenziApr 22, 2006
  30. Geert BoschApr 23, 2006
  31. Davide LibenziApr 24, 2006
  32. Geert BoschApr 24, 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.