aboutsummaryrefslogtreecommitdiffstats
path: root/connected.c
diff options
context:
space:
mode:
Diffstat (limited to 'connected.c')
-rw-r--r--connected.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/connected.c b/connected.c
index ed3025e7a2..b90fd61790 100644
--- a/connected.c
+++ b/connected.c
@@ -85,6 +85,7 @@ int check_connected(oid_iterate_fn fn, void *cb_data,
promisor_pack_found:
;
} while ((oid = fn(cb_data)) != NULL);
+ free(new_pack);
return 0;
}
@@ -100,6 +101,9 @@ no_promisor_pack_found:
strvec_push(&rev_list.args, "--exclude-promisor-objects");
if (!opt->is_deepening_fetch) {
strvec_push(&rev_list.args, "--not");
+ if (opt->exclude_hidden_refs_section)
+ strvec_pushf(&rev_list.args, "--exclude-hidden=%s",
+ opt->exclude_hidden_refs_section);
strvec_push(&rev_list.args, "--all");
}
strvec_push(&rev_list.args, "--quiet");
@@ -110,7 +114,7 @@ no_promisor_pack_found:
rev_list.git_cmd = 1;
if (opt->env)
- strvec_pushv(&rev_list.env_array, opt->env);
+ strvec_pushv(&rev_list.env, opt->env);
rev_list.in = -1;
rev_list.no_stdout = 1;
if (opt->err_fd)
@@ -118,8 +122,10 @@ no_promisor_pack_found:
else
rev_list.no_stderr = opt->quiet;
- if (start_command(&rev_list))
+ if (start_command(&rev_list)) {
+ free(new_pack);
return error(_("Could not run 'git rev-list'"));
+ }
sigchain_push(SIGPIPE, SIG_IGN);
@@ -151,5 +157,6 @@ no_promisor_pack_found:
err = error_errno(_("failed to close rev-list's stdin"));
sigchain_pop(SIGPIPE);
+ free(new_pack);
return finish_command(&rev_list) || err;
}