Skip to content

Commit

Permalink
Clarify help message when no remote is specified in fetch/pull.
Browse files Browse the repository at this point in the history
The message is especially confusing when "git fetch" is ran from "git
pull", for users not aware of "git fetch". The new message makes it clear
that "fetch" means "fetch new revisions", and gives hint on the solution.

We don't add a advice.* configuration option since this message doesn't
appear in normal use, and shouldn't disturb advanced users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Jul 27, 2010
1 parent e8b4ac3 commit d3b9dd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
int exit_code;

if (!remote)
die("Where do you want to fetch from today?");
die("No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched.");

transport = transport_get(remote, NULL);
transport_set_verbosity(transport, verbosity, progress);
Expand Down

0 comments on commit d3b9dd1

Please sign in to comment.