diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-09-05 07:34:43 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-07 17:59:23 (GMT) |
commit | 7366096de9d3e4aee4b49dfdf0438a8636187a84 (patch) | |
tree | 4f22136f699462053d9264a91fc258e72e1a5b46 /bundle.h | |
parent | 08342573792e9af79bf41b32c45ac471d25303bc (diff) | |
download | git-7366096de9d3e4aee4b49dfdf0438a8636187a84.zip git-7366096de9d3e4aee4b49dfdf0438a8636187a84.tar.gz git-7366096de9d3e4aee4b49dfdf0438a8636187a84.tar.bz2 |
bundle API: change "flags" to be "extra_index_pack_args"
Since the "flags" parameter was added in be042aff24c (Teach progress
eye-candy to fetch_refs_from_bundle(), 2011-09-18) there's never been
more than the one flag: BUNDLE_VERBOSE.
Let's have the only caller who cares about that pass "-v" itself
instead through new "extra_index_pack_args" parameter. The flexibility
of being able to pass arbitrary arguments to "unbundle" will be used
in a subsequent commit.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.h')
-rw-r--r-- | bundle.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -26,16 +26,19 @@ int create_bundle(struct repository *r, const char *path, int argc, const char **argv, struct strvec *pack_options, int version); int verify_bundle(struct repository *r, struct bundle_header *header, int verbose); -#define BUNDLE_VERBOSE 1 /** * Unbundle after reading the header with read_bundle_header(). * * We'll invoke "git index-pack --stdin --fix-thin" for you on the * provided `bundle_fd` from read_bundle_header(). + * + * Provide "extra_index_pack_args" to pass any extra arguments + * (e.g. "-v" for verbose/progress), NULL otherwise. The provided + * "extra_index_pack_args" (if any) will be strvec_clear()'d for you. */ int unbundle(struct repository *r, struct bundle_header *header, - int bundle_fd, int flags); + int bundle_fd, struct strvec *extra_index_pack_args); int list_bundle_refs(struct bundle_header *header, int argc, const char **argv); |