diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2019-11-10 21:41:25 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-11 03:46:28 +0100 |
commit | 79862b6b77c07b88ae1137fa602bf2046f979ad9 (patch) | |
tree | 5083a781f623851f03527d277e844ed110d41150 /bundle.c | |
parent | bundle: framework for options before bundle file (diff) | |
download | git-79862b6b77c07b88ae1137fa602bf2046f979ad9.tar.xz git-79862b6b77c07b88ae1137fa602bf2046f979ad9.zip |
bundle-create: progress output control
Support the progress output options from pack-objects in git-bundle's
create subcommand. Most notably, this provides --quiet as requested on
the git mailing list per [1]
Reference: https://www.mail-archive.com/git@vger.kernel.org/msg182844.html <robbat2-20190806T191156-796782357Z@orbis-terrarum.net>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r-- | bundle.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -249,15 +249,16 @@ out: /* Write the pack data to bundle_fd */ -static int write_pack_data(int bundle_fd, struct rev_info *revs) +static int write_pack_data(int bundle_fd, struct rev_info *revs, struct argv_array *pack_options) { struct child_process pack_objects = CHILD_PROCESS_INIT; int i; argv_array_pushl(&pack_objects.args, - "pack-objects", "--all-progress-implied", + "pack-objects", "--stdout", "--thin", "--delta-base-offset", NULL); + argv_array_pushv(&pack_objects.args, pack_options->argv); pack_objects.in = -1; pack_objects.out = bundle_fd; pack_objects.git_cmd = 1; @@ -428,7 +429,7 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs) } int create_bundle(struct repository *r, const char *path, - int argc, const char **argv) + int argc, const char **argv, struct argv_array *pack_options) { struct lock_file lock = LOCK_INIT; int bundle_fd = -1; @@ -470,7 +471,7 @@ int create_bundle(struct repository *r, const char *path, goto err; /* write pack */ - if (write_pack_data(bundle_fd, &revs)) + if (write_pack_data(bundle_fd, &revs, pack_options)) goto err; if (!bundle_to_stdout) { |