A helpful message tells the user when a remote was added without being fetched, and how to fetch it. Our default of not fetching is breaking the users' workflow in the common "let me access this repo" use case. This message alleviates the problem. Signed-off-by: Gabriel <g2p.code@xxxxxxxxx> --- builtin-remote.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/builtin-remote.c b/builtin-remote.c index d77f10a..044215a 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -111,8 +111,16 @@ static int add(int argc, const char **argv) return 1; } - if (fetch && fetch_remote(name)) - return 1; + if (fetch) { + if (fetch_remote(name)) + return 1; + } + else { + printf ("Added remote repository `%s' without fetching it.\n" + "Before accessing the branches of this " + "remote, run `git fetch %s' " + "or `git remote update'.\n", name, name); + } if (master) { strbuf_reset(&buf); -- 1.5.5.24.geb27 -- 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