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

Re: [PATCH] git-bundle: fix pack generation.

From
Junio C Hamano <junkio@cox.net>
Date
Mar 7, 2007, 23:32 UTC
Message-ID
<7vfy8geikk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0703072330200.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 20 quoted lines
> On Wed, 7 Mar 2007, Mark Levedahl wrote:
>
>> On 3/6/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> > 
>> > > git-bundle create test.bdl HEAD --since=1.day.ago ==>> pack with 
>> > > 1531 objects
>> > 
>> > Did you test with "--since=1.day.ago HEAD", i.e. with the correct 
>> > order? I know you'd like the options to be interminglable, but "HEAD" 
>> > really is not an option, but an argument.
>> 
>> Changing the order of arguments makes no difference, same result either 
>> way.
>
> We don't do thin packs. Should we? I guess that 
>
> 	$ git ls-tree -r HEAD | wc
>
> results in something close to 1500 in that repo. Which basically means 
> that the 1531 objects (including trees and the commit) sounds correct.
We should do thin packs, but 1500+ objects is a different story.
	rev-list --objects <revspec>
means "show me the revs and its objects".
	rev-list --max-count=<n> <revspec>
means "show me the revs and its objects, but stop at <n> revs".
On the other hand, 
	rev-list --objects ^<rev1> <rev2>

means something totally different. "never show me what is reachable from <rev1> but I am interested to see what are reachable from <rev2>".

So it is natural that "rev-list --objects --max-count=1 HEAD" shows the same set of tree and blob objects as "git-tar HEAD". "show me the revs and its objects" does not say "but exclude trees and blobs reachable from commits beyond the <n> revs boundary," which is "rev-list --objects HEAD^..HEAD".

In other words, "rev-list -1 HEAD" and "rev-list HEAD^..HEAD" are _different_.

We fixed (in 'next') the revision traversal so that --max-count and --boundary interact correctly. What's not fixed is that we still use "rev-list --objects --max-*" given by the user, which is not the semantics git-bundle wants. We should rewrite the revspec to drive pack-objects when generating the packfile part of the bundle to do "<revs> --not <boundaries>" internally in git-bundle.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 19 of 22 in “builtin git-bundle - pack contains many more objects than required”
  1. Mark LevedahlMar 6, 2007
  2. Junio C HamanoMar 6, 2007
  3. git-bundle: fix pack generation.Junio C Hamano, Mar 6, 2007
  4. Mark LevedahlMar 7, 2007
  5. Junio C HamanoMar 7, 2007
  6. Mark LevedahlMar 7, 2007
  7. Johannes SchindelinMar 7, 2007
  8. Mark LevedahlMar 7, 2007
  9. Johannes SchindelinMar 7, 2007
  10. Junio C HamanoMar 7, 2007
  11. Mark LevedahlMar 7, 2007
  12. Johannes SchindelinMar 7, 2007
  13. Linus TorvaldsMar 7, 2007
  14. git-bundle: Make thin packsJohannes Schindelin, Mar 8, 2007
  15. Linus TorvaldsMar 8, 2007
  16. Johannes SchindelinMar 8, 2007
  17. Junio C HamanoMar 8, 2007
  18. Johannes SchindelinMar 8, 2007
  19. Junio C HamanoMar 7, 2007
  20. git-bundle: avoid packing objects which are in the prerequisitesJohannes Schindelin, Mar 7, 2007
  21. Mark LevedahlMar 8, 2007
  22. Mark LevedahlMar 7, 2007

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.