create_bundle(): drop unused "header" parameter

There's no need to pass a header struct to create_bundle(); it writes the header information directly to a descriptor (and does not report back details to the caller). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jan 24, 2019 at 08:11 UTC fcb133e978e98cf92de3ec7dedd4969802191b13
3 files changed +5 -6
builtin/bundle.c
+1 -2
@@ -56,8 +56,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
56 }
57 if (!startup_info->have_repository)
58 die(_("Need a repository to create a bundle."));
59 - return !!create_bundle(the_repository, &header,
60 - bundle_file, argc, argv);
59 + return !!create_bundle(the_repository, bundle_file, argc, argv);
60 } else if (!strcmp(cmd, "unbundle")) {
61 if (!startup_info->have_repository)
62 die(_("Need a repository to unbundle."));
bundle.c
+2 -2
@@ -424,8 +424,8 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
424 return ref_count;
425 }
426
427 -int create_bundle(struct repository *r, struct bundle_header *header,
428 - const char *path, int argc, const char **argv)
427 +int create_bundle(struct repository *r, const char *path,
428 + int argc, const char **argv)
429 {
430 struct lock_file lock = LOCK_INIT;
431 int bundle_fd = -1;
bundle.h
+2 -2
@@ -18,8 +18,8 @@ struct bundle_header {
18
19 int is_bundle(const char *path, int quiet);
20 int read_bundle_header(const char *path, struct bundle_header *header);
21 -int create_bundle(struct repository *r, struct bundle_header *header,
22 - const char *path, int argc, const char **argv);
21 +int create_bundle(struct repository *r, const char *path,
22 + int argc, const char **argv);
23 int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
24 #define BUNDLE_VERBOSE 1
25 int unbundle(struct repository *r, struct bundle_header *header,