]> granicus.if.org Git - git/commitdiff
Merge branch 'jt/delay-fetch-if-missing' into pu
authorJunio C Hamano <gitster@pobox.com>
Fri, 25 Oct 2019 06:10:19 +0000 (15:10 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Oct 2019 06:10:19 +0000 (15:10 +0900)
Work-around a lazy fetch glitch.

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

1  2 
builtin/fetch.c

diff --cc builtin/fetch.c
index 6b6dad68eeb6d028258dfa9d732e59e4a35b945d,863c858fde9afb3daac09c7ecf83cf44834574d5..a03b8447e45b92e5fcc4990842a4216d6eaa71fd
@@@ -1754,14 -1753,8 +1754,12 @@@ int cmd_fetch(int argc, const char **ar
        int prune_tags_ok = 1;
        struct argv_array argv_gc_auto = ARGV_ARRAY_INIT;
  
 +      register_allowed_protocol_version(protocol_v2);
 +      register_allowed_protocol_version(protocol_v1);
 +      register_allowed_protocol_version(protocol_v0);
 +
        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++)