Re: [RFC] git-remote
- From
- J. Bruce Fields <bfields@fieldses.org>
- Date
- Jan 10, 2007, 18:13 UTC
- Message-ID
- <20070110181320.GA20108@fieldses.org>
- In-Reply-To
- <45A35EED.5090105@op5.se>
On Tue, Jan 09, 2007 at 10:22:53AM +0100, Andreas Ericsson wrote:
Show 19 quoted lines
> Junio C Hamano wrote:
> >"J. Bruce Fields" <bfields@fieldses.org> 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.