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

From: Jakub Narebski <[email-masked]>
Date: Fri, 23 Nov 2007 10:18:48 +0100

On Thu, 22 Nov 2007, Junio C Hamano :
> "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 "theirs" ref pointing at that
>    object.
> 
> If bundle.bdl does not exist yet, it is like pushing into a
> freshly initialized empty repository.

But for that I think "git bundle" should learn new subcommand:
"git bundle update", which would use refs existing in given
bundle as prerequisites, and either update bundle (create anew
or just concatenate next pack) or create incremental bundle.

Something similar to incremental mode or update command of
archivers...

-- 
Jakub Narebski
Poland