aboutsummaryrefslogtreecommitdiff
path: root/bundle.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 09:04:36 -0800
committerJunio C Hamano <gitster@pobox.com>2019-12-01 09:04:36 -0800
commitca5c8aa8e1cf837613801f26d22f63caea53484e (patch)
tree7087f37a9b1026980371926765f42a4bd875b664 /bundle.c
parentd2489ce92c9ce81b3701a5e25547b969cb6e5209 (diff)
parente0eba649e8c2a4271e3bcfb9ebcd358900d425c9 (diff)
downloadgit-ca5c8aa8e1cf837613801f26d22f63caea53484e.tar.xz
Merge branch 'rj/bundle-ui-updates'
"git bundle" has been taught to use the parse options API. "git bundle verify" learned "--quiet" and "git bundle create" learned options to control the progress output. * rj/bundle-ui-updates: bundle-verify: add --quiet bundle-create: progress output control bundle: framework for options before bundle file
Diffstat (limited to 'bundle.c')
-rw-r--r--bundle.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bundle.c b/bundle.c
index a85ed3f7bc..99439e07a1 100644
--- a/bundle.c
+++ b/bundle.c
@@ -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) {