Browse Source

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>
maint
William Baker 5 years ago committed by Junio C Hamano
parent
commit
64d80e7d52
  1. 6
      midx.c

6
midx.c

@ -1373,6 +1373,12 @@ int midx_repack(struct repository *r, const char *object_dir, size_t batch_size, @@ -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;

Loading…
Cancel
Save