git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-bundle question.
@ 2008-05-11 22:11 Govind Salinas
  2008-05-12  0:28 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Govind Salinas @ 2008-05-11 22:11 UTC (permalink / raw)
  To: Git Mailing List

Hi,

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.

Thanks,
Govind.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-bundle question.
  2008-05-11 22:11 git-bundle question Govind Salinas
@ 2008-05-12  0:28 ` Junio C Hamano
       [not found]   ` <5d46db230805111817i786f3402qbfd5ec70d020ab1f@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2008-05-12  0:28 UTC (permalink / raw)
  To: Govind Salinas; +Cc: Git Mailing List

"Govind Salinas" <govind@sophiasuchtig.com> writes:

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-bundle question.
       [not found]   ` <5d46db230805111817i786f3402qbfd5ec70d020ab1f@mail.gmail.com>
@ 2008-05-12  1:19     ` Govind Salinas
  0 siblings, 0 replies; 3+ messages in thread
From: Govind Salinas @ 2008-05-12  1:19 UTC (permalink / raw)
  To: Git Mailing List

forgot to reply to list

On Sun, May 11, 2008 at 8:17 PM, Govind Salinas
<govind@sophiasuchtig.com> wrote:
> On Sun, May 11, 2008 at 7:28 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> "Govind Salinas" <govind@sophiasuchtig.com> writes:
>>
>>> 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.
>>
>>
>
> Sure, I understand that.  However, I can use a tag to create a bundle
> that does not go to an endpoint.  I can also advance that branch to
> a later commit by whatever mechanism (say committing something)
> and then the bundle no longer points to the endpoint, it points to
> the middle somewhere.  Git, from what I have seen, likes to treat
> HEADs as just another commit and it is a bit surprising to see this
> particular limitation here.  I see this as kind of like git-push where
> the person who has the commits is specifying them, and there you
> can specify any commit.  Although pull/fetch have similar
> limitations, so perhaps it is not so surprising.
>
> If I wanted to share a patch series via bundle and the patches I
> wanted went from HEAD~10..HEAD~5 then I *could* checkout -b
> HEAD~5 or tag HEAD~5, but I do not see an advantage to doing so.
>
> I don't really use bundles, so it's not a big deal to me.  I just
> thought I would ask to make sure I wasn't going to break something.
>
> Thanks,
> Govind.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-12  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11 22:11 git-bundle question Govind Salinas
2008-05-12  0:28 ` Junio C Hamano
     [not found]   ` <5d46db230805111817i786f3402qbfd5ec70d020ab1f@mail.gmail.com>
2008-05-12  1:19     ` Govind Salinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).