Skip to content

Commit 526f108

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea0fc3b commit 526f108

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

connected.c

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ int check_connected(sha1_iterate_fn fn, void *cb_data,
6363
_("Checking connectivity"));
6464

6565
rev_list.git_cmd = 1;
66+
rev_list.env = opt->env;
6667
rev_list.in = -1;
6768
rev_list.no_stdout = 1;
6869
if (opt->err_fd)

connected.h

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ struct check_connected_options {
3333

3434
/* If non-zero, show progress as we traverse the objects. */
3535
int progress;
36+
37+
/*
38+
* Insert these variables into the environment of the child process.
39+
*/
40+
const char **env;
3641
};
3742

3843
#define CHECK_CONNECTED_INIT { 0 }

0 commit comments

Comments
 (0)