]> git.ipfire.org Git - thirdparty/git.git/commitdiff
check_connected: accept an env argument
authorJeff King <peff@peff.net>
Mon, 3 Oct 2016 20:49:08 +0000 (16:49 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Oct 2016 20:54:02 +0000 (13:54 -0700)
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>
connected.c
connected.h

index 8e3e4b1dc1271f0530d10469dc5ef4eeb46526ea..136c2ac16839b8d4de9b653337dc4794c2a4ea34 100644 (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)
index afa48cc0524764a65053f5bb1392142de3251609..4ca325f79dc5ee45823834f71f66a6d3b278c3e5 100644 (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 }