summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar William Baker <William.Baker@microsoft.com>2019-10-21 18:40:02 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-23 12:05:06 +0900
commit64d80e7d52cc2663a44157fc3d49af576ea10192 (patch)
treecdd39bdca4134f0883c84a0dfae7d0334dd35bb9
parentmidx: honor the MIDX_PROGRESS flag in verify_midx_file (diff)
downloadtgif-64d80e7d52cc2663a44157fc3d49af576ea10192.tar.xz
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 1b22b2144e..37ec28623a 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;