diff options
Diffstat (limited to 'promisor-remote.c')
-rw-r--r-- | promisor-remote.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c index ac3aa1e365..2ca7c2ae48 100644 --- a/promisor-remote.c +++ b/promisor-remote.c @@ -8,6 +8,7 @@ #include "transport.h" #include "strvec.h" #include "packfile.h" +#include "environment.h" struct promisor_remote_config { struct promisor_remote *promisors; @@ -22,6 +23,16 @@ static int fetch_objects(struct repository *repo, struct child_process child = CHILD_PROCESS_INIT; int i; FILE *child_in; + int quiet; + + if (git_env_bool(NO_LAZY_FETCH_ENVIRONMENT, 0)) { + static int warning_shown; + if (!warning_shown) { + warning_shown = 1; + warning(_("lazy fetching disabled; some objects may not be available")); + } + return -1; + } child.git_cmd = 1; child.in = -1; @@ -31,6 +42,8 @@ static int fetch_objects(struct repository *repo, "fetch", remote_name, "--no-tags", "--no-write-fetch-head", "--recurse-submodules=no", "--filter=blob:none", "--stdin", NULL); + if (!git_config_get_bool("promisor.quiet", &quiet) && quiet) + strvec_push(&child.args, "--quiet"); if (start_command(&child)) die(_("promisor-remote: unable to fork off fetch subprocess")); child_in = xfdopen(child.in, "w"); |