aboutsummaryrefslogtreecommitdiffstats
path: root/promisor-remote.c
diff options
authorTom Hughes <tom@compton.nu>2024-05-25 11:09:27 +0100
committerJunio C Hamano <gitster@pobox.com>2024-05-26 09:17:08 -0700
commit7e17d954d8325824c40d0441eb10888d5178755e (patch)
tree564674b2926c9047159d62d59d18b109886796a8 /promisor-remote.c
parent786a3e4b8d754d2b14b1208b98eeb0a554ef19a8 (diff)
downloadgit-7e17d954d8325824c40d0441eb10888d5178755e.tar.gz
promisor-remote: add promisor.quiet configuration option
Add a configuration option to allow output from the promisor fetching objects to be suppressed. This allows us to stop commands like 'git blame' being swamped with progress messages and gc notifications from the promisor when used in a partial clone. Signed-off-by: Tom Hughes <tom@compton.nu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'promisor-remote.c')
-rw-r--r--promisor-remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index ac3aa1e365..384cbfea02 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -22,6 +22,7 @@ static int fetch_objects(struct repository *repo,
struct child_process child = CHILD_PROCESS_INIT;
int i;
FILE *child_in;
+ int quiet;
child.git_cmd = 1;
child.in = -1;
@@ -31,6 +32,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");