From: Jeff King Date: Mon, 3 Oct 2016 20:49:08 +0000 (-0400) Subject: check_connected: accept an env argument X-Git-Tag: v2.11.0-rc0~60^2~4 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=526f108a271b331af9ae92796215e560e5ec4677;p=git.git check_connected: accept an env argument This lets callers influence the environment seen by rev-list, which will be useful when we start providing quarantined objects. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/connected.c b/connected.c index 8e3e4b1dc1..136c2ac168 100644 --- a/connected.c +++ b/connected.c @@ -63,6 +63,7 @@ int check_connected(sha1_iterate_fn fn, void *cb_data, _("Checking connectivity")); rev_list.git_cmd = 1; + rev_list.env = opt->env; rev_list.in = -1; rev_list.no_stdout = 1; if (opt->err_fd) diff --git a/connected.h b/connected.h index afa48cc052..4ca325f79d 100644 --- a/connected.h +++ b/connected.h @@ -33,6 +33,11 @@ struct check_connected_options { /* If non-zero, show progress as we traverse the objects. */ int progress; + + /* + * Insert these variables into the environment of the child process. + */ + const char **env; }; #define CHECK_CONNECTED_INIT { 0 }