diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-10-12 14:52:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-12 18:13:25 +0200 |
commit | 89bd7fedf947484da08e2722d663fdac23a431be (patch) | |
tree | 3b293a3fd460a91bc59ae0511338348f3a5c2aec /bundle.h | |
parent | bundle-uri: fetch a list of bundles (diff) | |
download | git-89bd7fedf947484da08e2722d663fdac23a431be.tar.xz git-89bd7fedf947484da08e2722d663fdac23a431be.zip |
bundle: add flags to verify_bundle()
The verify_bundle() method has a 'verbose' option, but we will want to
extend this method to have more granular control over its output. First,
replace this 'verbose' option with a new 'flags' option with a single
possible value: VERIFY_BUNDLE_VERBOSE.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.h')
-rw-r--r-- | bundle.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -29,7 +29,13 @@ int read_bundle_header_fd(int fd, struct bundle_header *header, 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); + +enum verify_bundle_flags { + VERIFY_BUNDLE_VERBOSE = (1 << 0), +}; + +int verify_bundle(struct repository *r, struct bundle_header *header, + enum verify_bundle_flags flags); /** * Unbundle after reading the header with read_bundle_header(). @@ -40,9 +46,13 @@ int verify_bundle(struct repository *r, struct bundle_header *header, int verbos * 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. + * + * Before unbundling, this method will call verify_bundle() with the + * given 'flags'. */ int unbundle(struct repository *r, struct bundle_header *header, - int bundle_fd, struct strvec *extra_index_pack_args); + int bundle_fd, struct strvec *extra_index_pack_args, + enum verify_bundle_flags flags); int list_bundle_refs(struct bundle_header *header, int argc, const char **argv); |