Subject: Re: Wishlist for a bundle-only transport mode

From: Junio C Hamano <[email-masked]>
Date: Thu, 22 Nov 2007 02:02:09 -0800

"Santi Béjar" <[email-masked]> writes:

> Sorry but I do not understand this. I think this two lines could be equivalent:
>
> git push --bundle bundle.bdl "refs/heads/master:refs/remotes/bundle/master"
> git bundle create bundle.bdl refs/heads/master ^refs/remotes/bundle/master

Interesting.

	$ git push $something ours:theirs

has defined semantics for any value of $something.

 * give $something objects it lacks, so that the object $ours
   become complete in there;

 * set the ref in $theirs to point at the object $ours.

So "git push bundle.bdl refspec" should:

 * First read bundle.bdl, to find out what objects it gives to
   the recipients;

 * Add missing objects to it to make it up to date wrt "ours",
   iow, fetching from the updated bundle would now give "ours";

 * Record the object "ours" as "theirs" ref, iow, listing
   the updated bundle would show "theis" ref pointing at that
   object.

If bundle.bdl does not exist yet, it is like pushing into a
freshly initialized empty repository.