]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jt/delay-fetch-if-missing'
authorJunio C Hamano <gitster@pobox.com>
Mon, 4 Nov 2019 04:33:05 +0000 (13:33 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Nov 2019 04:33:05 +0000 (13:33 +0900)
Work-around a lazy fetch glitch.

* jt/delay-fetch-if-missing:
  fetch: delay fetch_if_missing=0 until after config

builtin/fetch.c

index 0c345b5dfe4b09e8d626815cb9909ef1f78e6338..863c858fde9afb3daac09c7ecf83cf44834574d5 100644 (file)
@@ -1755,8 +1755,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
 
        packet_trace_identity("fetch");
 
-       fetch_if_missing = 0;
-
        /* Record the command line for the reflog */
        strbuf_addstr(&default_rla, "fetch");
        for (i = 1; i < argc; i++)
@@ -1824,6 +1822,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
                }
        }
 
+       fetch_if_missing = 0;
+
        if (remote) {
                if (filter_options.choice || has_promisor_remote())
                        fetch_one_setup_partial(remote);