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 коммит произвёл Junio C Hamano
Родитель ea0fc3b417
Коммит 526f108a27
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

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

Просмотреть файл

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