git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Clarify help message when no remote is specified in fetch/pull.
@ 2010-07-26 16:32 Matthieu Moy
  2010-07-27 17:36 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Moy @ 2010-07-26 16:32 UTC (permalink / raw)
  To: git, gitster; +Cc: Matthieu Moy

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>
---
I already gave this a try a long time ago:

  http://thread.gmane.org/gmane.comp.version-control.git/143229/focus=143404

This version should fix the drawbacks mentionned by Junio.

 builtin/fetch.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index 6eb1dfe..1b67f5f 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -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);
-- 
1.7.2.19.g9a302.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Clarify help message when no remote is specified in fetch/pull.
  2010-07-26 16:32 [PATCH] Clarify help message when no remote is specified in fetch/pull Matthieu Moy
@ 2010-07-27 17:36 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2010-07-27 17:36 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

Sounds good.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-27 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 16:32 [PATCH] Clarify help message when no remote is specified in fetch/pull Matthieu Moy
2010-07-27 17:36 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).