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

Re: [PATCH,v2] git-bundle(1): add no references required simplest case

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 2, 2009, 00:45 UTC
Message-ID
<7vab95r7j4.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0902020056520.3586@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> +A complete bundle is one that does not require you to have any
>
> I have not heard of any "complete" bundle before, and I do not understand 
> the need for such a definition, either.

Sorry, that's mine, not Jidanni's fault. I agree that we do not necessarily have to introduce a new term.

Show 15 quoted lines
>> +as if it was a remote repository, like this:
>> +
>> +----------------
>> +$ git clone /home/me/tmp/file.bdl mine.git
>> +----------------
>> +
>> +This will define a remote called "origin" in the resulting
>> +repository that lets you fetch and pull from the bundle, just
>> +like the previous example lets you do with the remote called
>> +"bundle", and from then on you can fetch/pull to update the
>> +resulting mine.git repository after replacing the bundle you store
>> +at /home/me/tmp/file.bdl with incremental updates.
>
> IMO this paragraph just adds words, not anything the user does not know 
> already by that stage.
True again.

The only justification that an example of cloning from a complete (or "baseless" or "full" or whatever new term we have already agreed that is not needed ;-)) bundle in the example I can think of is that by having such an example way earlier in the example sequence, we could show a full cycle of sneakernetting into a repository. You bootstrap it by cloning from a complete bundle, so that the clone has remotes set up to facilitate further updates via fetch/pull pointing at a known location. Then you drop a new bundle to the same location that is relative to an earlier one, and pull from it to incrementally keep the repository up-to-date.

In other words, we currently have a very cursory description that says you can ls-remote and fetch from a bundle at the end, and mention that the remote configuration can be defined to facilitate repeated sneakernet operation. But we could reorganize the example this way (the ones with asterisk are already in our example section, the ones with plus are additions):

 * you first create a full bundle without basis
	$ git bundle create mybundle master
 * you make note of the current tip to optimize later bundles
        $ git tag -f lastR2bundle master
 + sneakernet it and clone it to prime the recipient
	... sneakernet mybundle to /home/me/tmp/mybundle
 	$ git clone /home/me/tmp/mybundle mine.git
 + after working more in the original, create an incremental bundle
	$ git bundle create mybundle lastR2bundle..master
	$ git tag -f lastR2bundle master
 + sneakernet it again, and use it to update the recipient
 
	... sneakernet the new mybundle to /home/me/tmp/mybundle
 	$ git pull /home/me/tmp/mybundle mine.git

to show the simplest "full cycle" of sneakernet workflow. And then show various variations we already have in the existing examples.

Something like:
    In addition, if you know up to what commit the intended recipient
    repository should have the necessary objects for, you can use that
    knowledge to specify the basis, giving a cut-off point to limit the
    revisions and objects that go in to the resulting bundle.  Here are the
    examples:
     * using a tag present in both to optimize the bundle
            $ git bundle create mybundle master ^v1.0.0
     * using a basis based on time to optimize the bundle
            $ git bundle create mybundle master --since=10.days
     * using the number of commits to optimize the bundle
            $ git bundle create mybundle master -n 10 
    A bundle from a recipient repository's point of view is just like a
    regular repository it fetches/pulls from.  You can for example map
    refs, like this example, when fetching.
            $ git fetch mybundle master:localRef
    Or see what refs it offers
            $ git ls-remote mybundle
Previous: Johannes SchindelinNext: jidanni@jidanni.org
Message 25 of 32 in “How to extract files out of a "git bundle", no matter what?”
  1. jidanni@jidanni.orgDec 19, 2008
  2. Shawn O. PearceDec 19, 2008
  3. Mark LevedahlDec 19, 2008
  4. jidanni@jidanni.orgDec 19, 2008
  5. Jeff KingDec 19, 2008
  6. jidanni@jidanni.orgDec 19, 2008
  7. Jeff KingDec 19, 2008
  8. Documentation/git-bundle.txt: Dumping contents of any bundlejidanni@jidanni.org, Jan 1, 2009
  9. Johannes SchindelinJan 1, 2009
  10. Jeff KingJan 1, 2009
  11. jidanni@jidanni.orgJan 1, 2009
  12. Jeff KingJan 1, 2009
  13. jidanni@jidanni.orgJan 2, 2009
  14. Shawn O. PearceJan 2, 2009
  15. Jeff KingJan 2, 2009
  16. jidanni@jidanni.orgJan 2, 2009
  17. git ls-tree prints wacko file sizes if it can't find the blobjidanni@jidanni.org, Jan 1, 2009
  18. jidanni@jidanni.orgJan 1, 2009
  19. Handle sha1_object_info failures in ls-tree -lAlex Riesen, Jan 1, 2009
  20. git-bundle(1): add no references required simplest casejidanni@jidanni.org, Jan 26, 2009
  21. Junio C HamanoJan 26, 2009
  22. git-bundle(1): add no references required simplest casejidanni@jidanni.org, Jan 29, 2009
  23. jidanni@jidanni.orgFeb 1, 2009
  24. Johannes SchindelinFeb 2, 2009
  25. Junio C HamanoFeb 2, 2009
  26. jidanni@jidanni.orgFeb 4, 2009
  27. Junio C HamanoFeb 4, 2009
  28. jidanni@jidanni.orgFeb 4, 2009
  29. git-bundle doc: update examplesNanako Shiraishi, Feb 4, 2009
  30. Jeff KingFeb 4, 2009
  31. Junio C HamanoFeb 4, 2009
  32. Junio C HamanoDec 19, 2008

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.