Merge branch 'th/quiet-lazy-fetch-from-promisor'

The promisor.quiet configuration knob can be set to true to make
lazy fetching from promisor remotes silent.

* th/quiet-lazy-fetch-from-promisor:
  promisor-remote: add promisor.quiet configuration option
This commit is contained in:
Junio C Hamano
2024-06-06 12:49:23 -07:00
4 changed files with 51 additions and 0 deletions

View File

@ -23,6 +23,7 @@ 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;
@ -41,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");