1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 23:56:28 +02:00

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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2016-10-03 16:49:08 -04:00 committed by Junio C Hamano
parent ea0fc3b417
commit 526f108a27
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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 }