summaryrefslogtreecommitdiff
path: root/builtin-fetch.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-03-21 23:02:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-03-21 23:02:55 -0700
commit3c954c23d6e951404fada178ee3ac9b747424d85 (patch)
tree688648db5aabb8b91d5acdceee2b211374b1a946 /builtin-fetch.c
parentMerge branch 'jc/maint-1.6.0-read-tree-overlay' into maint (diff)
parentRemove total confusion from git-fetch and git-push (diff)
downloadtgif-3c954c23d6e951404fada178ee3ac9b747424d85.tar.xz
Merge branch 'db/maint-missing-origin' into maint
* db/maint-missing-origin: Remove total confusion from git-fetch and git-push Give error when no remote is configured
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 1e4a3d9c51..7fb35fca9d 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -636,6 +636,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
else
remote = remote_get(argv[0]);
+ if (!remote)
+ die("Where do you want to fetch from today?");
+
transport = transport_get(remote, remote->url[0]);
if (verbosity >= 2)
transport->verbose = 1;
@@ -648,9 +651,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (depth)
set_option(TRANS_OPT_DEPTH, depth);
- if (!transport->url)
- die("Where do you want to fetch from today?");
-
if (argc > 1) {
int j = 0;
refs = xcalloc(argc + 1, sizeof(const char *));