Subject: Re: [RFC] git-remote

From: "J. Bruce Fields" <[email-masked]>
Date: Wed, 10 Jan 2007 13:13:20 -0500

On Tue, Jan 09, 2007 at 10:22:53AM +0100, Andreas Ericsson wrote:
> Junio C Hamano wrote:
> >"J. Bruce Fields" <[email-masked]> writes:
> >
> >>Would it make sense for "git add" to do the initial fetch as well?
> >
> >It would be handy.
> >
> >And perhaps we could make it the default but with a command line
> >override to help disconnected people.
> >
> 
> I'd rather do it the other way around ("--fetch" switch) and if that 
> wasn't supplied, tell the user that he should now run
> 
> 	git fetch $whatever_name_was_supplied
> 
> The reason being it's easier to fetch afterwards than it is to undo the 
> fetch if you didn't mean to do it straight away. Judging by its other 
> uses, I also wouldn't expect the command to actually work over the network.

Actually, "git remote show" also seems to require the network, as it
does an ls-remote.  That I found a little more surprising.

I don't think a user should be surprised that a command that takes a url
would require the network.  And although I could imagine uses for "git
remote add" when disconnected, I'd imagine by far the most common uses
would be where the user also wants to examine a remote branch
immediately.

--b.