summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Baker <William.Baker@microsoft.com>2019-10-21 18:40:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-23 03:05:06 (GMT)
commit64d80e7d52cc2663a44157fc3d49af576ea10192 (patch)
treecdd39bdca4134f0883c84a0dfae7d0334dd35bb9
parentad60096d1c82a6e05a01bb33c12cd1070bf01b4f (diff)
downloadgit-64d80e7d52cc2663a44157fc3d49af576ea10192.zip
git-64d80e7d52cc2663a44157fc3d49af576ea10192.tar.gz
git-64d80e7d52cc2663a44157fc3d49af576ea10192.tar.bz2
midx: honor the MIDX_PROGRESS flag in midx_repack
Update midx_repack to only display progress when the MIDX_PROGRESS flag is set. Signed-off-by: William Baker <William.Baker@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--midx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/midx.c b/midx.c
index 1b22b21..37ec286 100644
--- a/midx.c
+++ b/midx.c
@@ -1373,6 +1373,12 @@ int midx_repack(struct repository *r, const char *object_dir, size_t batch_size,
strbuf_addstr(&base_name, object_dir);
strbuf_addstr(&base_name, "/pack/pack");
argv_array_push(&cmd.args, base_name.buf);
+
+ if (flags & MIDX_PROGRESS)
+ argv_array_push(&cmd.args, "--progress");
+ else
+ argv_array_push(&cmd.args, "-q");
+
strbuf_release(&base_name);
cmd.git_cmd = 1;