diff options
Diffstat (limited to 'builtin/fetch.c')
| -rw-r--r-- | builtin/fetch.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 0020015ca4..6a6a58d49c 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -3,6 +3,9 @@ */ #include "cache.h" #include "config.h" +#include "gettext.h" +#include "environment.h" +#include "hex.h" #include "repository.h" #include "refs.h" #include "refspec.h" @@ -1133,6 +1136,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, if (!connectivity_checked) { struct check_connected_options opt = CHECK_CONNECTED_INIT; + opt.exclude_hidden_refs_section = "fetch"; rm = ref_map; if (check_connected(iterate_ref_map, &rm, &opt)) { rc = error(_("%s did not send all necessary objects\n"), url); @@ -1326,6 +1330,7 @@ static int check_exist_and_connected(struct ref *ref_map) } opt.quiet = 1; + opt.exclude_hidden_refs_section = "fetch"; return check_connected(iterate_ref_map, &rm, &opt); } @@ -1881,6 +1886,8 @@ static void add_options_to_argv(struct strvec *argv) strvec_push(argv, "--ipv4"); else if (family == TRANSPORT_FAMILY_IPV6) strvec_push(argv, "--ipv6"); + if (!write_fetch_head) + strvec_push(argv, "--no-write-fetch-head"); } /* Fetch multiple remotes in parallel */ @@ -1891,7 +1898,8 @@ struct parallel_fetch_state { int next, result; }; -static int fetch_next_remote(struct child_process *cp, struct strbuf *out, +static int fetch_next_remote(struct child_process *cp, + struct strbuf *out UNUSED, void *cb, void **task_cb) { struct parallel_fetch_state *state = cb; @@ -1913,7 +1921,8 @@ static int fetch_next_remote(struct child_process *cp, struct strbuf *out, return 1; } -static int fetch_failed_to_start(struct strbuf *out, void *cb, void *task_cb) +static int fetch_failed_to_start(struct strbuf *out UNUSED, + void *cb, void *task_cb) { struct parallel_fetch_state *state = cb; const char *remote = task_cb; |
