X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fetch.c;h=7fb35fca9d1b57dacaebfd3cb9b2af4d035e750c;hb=3db964b551827e25f897cc75ffd8e520ee8b48cd;hp=8c86974cbee0341d7c0e110055bb4347ad5908ad;hpb=4a16d072723b48699ea162da24eff05eba298834;p=git.git diff --git a/builtin-fetch.c b/builtin-fetch.c index 8c86974cb..7fb35fca9 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 *)); @@ -673,7 +673,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix) ref_nr = j; } - sigchain_push(SIGINT, unlock_pack_on_signal); + sigchain_push_common(unlock_pack_on_signal); atexit(unlock_pack); exit_code = do_fetch(transport, parse_fetch_refspec(ref_nr, refs), ref_nr);