[PATCH] Clarify help message when no remote is specified in fetch/pull.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]