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

From: Jakub Narebski <[email-masked]>
Date: Wed, 21 Nov 2007 18:11:34 +0100

Johannes Schindelin wrote:
> On Wed, 21 Nov 2007, Jakub Narebski wrote:
>> Johannes Schindelin wrote:
>>> On Wed, 21 Nov 2007, Jakub Narebski wrote:
>>>> Santi Bejar wrote:
>>>> 
>>>>> 3) I can "git fetch" a bundle but I cannot "git push" a bundle, so if I have:
>>>>> 
>>>>> [remote "bundle"]
>>>>> 	url = /file/to/bundle
>>>>> 	fetch = "+refs/heads/*:refs/remotes/bundle/*"
>>>>> 
>>>>> $ git push bundle
>>>>> 
>>>>> would create a bundle in /file/to/bundle with the same branches as a
>>>>> normal git push, but considering the remote branches as the local
>>>>> remotes/bundle/*
>>>> 
>>>> And how you would differentiate between path meaning bundle, and path 
>>>> meaning "local" protocol, i.e. git repository on the same filesystem? 
>>> 
>>> Maybe because the git repository is specified as an existing directory?  
>>> The bundle is specified as a (possibly non-existing) file...
>> 
>> That has the disadvantage of pushing to bundle when you make an error
>> in the lastpart of path to existing repository.
> 
> As I wrote in another reply, I would not allow overwriting an existing 
> file.

> Specifying a non-existing file should be good enough.

What I meant here that if you do "git push /some/path/to/rpeo.git", with
mistake in the last part of path to repository, you would end up with
a bundle, and you would have to really watch what happened to catch
the error.

I'd rather use "git push bundle:///some/path/to/bundle" or 
"git push --bundle bundlename" to catch errors better.

Besides it should be IMHO be possible to overwrite bundle if you are
doing fast-forward push...

-- 
Jakub Narebski
Poland