Re: [PATCH] When a remote is added but not fetched, tell the user.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 11, 2008, 21:39 UTC
- Message-ID
- <7v4pa8rs00.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20080411190816.GA17277@mithlond>
Teemu Likonen <tlikonen@iki.fi> writes:
Show 14 quoted lines
> Gabriel wrote (2008-04-11 20:35 +0200): > >> I think the transcript that started the thread makes it clear that >> having "git remote add" not fetching is not the right default. The >> user wants to use a remote repository, and has learned these are >> called "remotes". So he does not have too much trouble >> finding/remembering the command "git remote add <name> <url>". Now >> with the user's goal in mind, it makes no sense to add a remote and >> then not fetch it, because the user definitely wants to do something >> with the remote. By not fetching it, we are surprising the user > > Hmm, I'm quite newbie but I have never expected "git remote add" to > fetch anything. I wouldn't want it to do it automatically. From the > beginning I saw "git remote" as a _configuration_ tool.
Good student ;-).
Not only that fetch-after-add is _not_ a common nor majority thing at all (contrary to what Gabriel assumed), the "fetch" step is conceptually an unrelated operation from the primary point of "remote add"; "-f" option is a mere convenience feature and we stop at making it conveniently available, never making it a default nor overly advertising it.
If the user tells you not to fetch, the command should not bother the user with excess messages, unless the user explicitly asks to, either.