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

Re: git-bundle question.

From
Junio C Hamano <gitster@pobox.com>
Date
May 12, 2008, 00:28 UTC
Message-ID
<7v3aoo2wob.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<5d46db230805111511g5bbb0b9amf65fb95266a80504@mail.gmail.com>
"Govind Salinas" <govind@sophiasuchtig.com> writes:
Show 9 quoted lines
> I am writing my wrapper over git bundle and I noticed that the
> "SPECIFYING REFERENCES" section says that the it will only
> bundle things that end in something git-show-ref can find.
>
> I can probably work around this by silently creating a tag
> doing the bundle and deleting the tag, but I want to know why
> this restriction is in there in the first place?  If there is a good
> reason for it then I will probably just add this info to the
> documentation.

Because bundle is not just a random collection of objects, a tarball of your .git/objects/. Instead, it is a (partial) history that leads to a particular (set of) versions.

Think of it as what "git fetch $somewhere $that_branch" could give you. It is not giving you just a collection of random objects, but you are choosing from the endpoint the particular repository ($somewhere) is offering you.

When you publish your history to be fetched over the network (or locally for that matter), you do not just put bunch of objects there. You give branches to mark where the histories end. It's the same deal with bundles, and the only difference is the transfer may go over sneakernet.

Previous: Govind SalinasNext: Govind Salinas
Message 2 of 3 in “git-bundle question.”
  1. Govind SalinasMay 11, 2008
  2. Junio C HamanoMay 12, 2008
  3. Govind SalinasMay 12, 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.