diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-03-17 18:58:41 -0700 |
| commit | 9d5b05c6d56a0fb12d43d50d7853178feaf59daa (patch) | |
| tree | 9b8179288ca004c2a5bf7d8bc74d1ed8ce8f13fe /builtin-fetch.c | |
| parent | 6e5660a7ab20275d80262d0a21bc6c52eead9cd7 (diff) | |
| parent | 9326d49412c8c154b43cb7eba2a8692e9703b0f4 (diff) | |
| download | git-9d5b05c6d56a0fb12d43d50d7853178feaf59daa.tar.gz | |
Merge branch 'db/maint-missing-origin'
* 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.c | 6 |
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 *)); |
