Skip to content

Commit

Permalink
create_bundle(): drop unused "header" parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and gitster committed Jan 24, 2019
1 parent 74f8a9c commit fcb133e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions builtin/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
}
if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));
return !!create_bundle(the_repository, &header,
bundle_file, argc, argv);
return !!create_bundle(the_repository, bundle_file, argc, argv);
} else if (!strcmp(cmd, "unbundle")) {
if (!startup_info->have_repository)
die(_("Need a repository to unbundle."));
Expand Down
4 changes: 2 additions & 2 deletions bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
return ref_count;
}

int create_bundle(struct repository *r, struct bundle_header *header,
const char *path, int argc, const char **argv)
int create_bundle(struct repository *r, const char *path,
int argc, const char **argv)
{
struct lock_file lock = LOCK_INIT;
int bundle_fd = -1;
Expand Down
4 changes: 2 additions & 2 deletions bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ struct bundle_header {

int is_bundle(const char *path, int quiet);
int read_bundle_header(const char *path, struct bundle_header *header);
int create_bundle(struct repository *r, struct bundle_header *header,
const char *path, int argc, const char **argv);
int create_bundle(struct repository *r, const char *path,
int argc, const char **argv);
int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
#define BUNDLE_VERBOSE 1
int unbundle(struct repository *r, struct bundle_header *header,
Expand Down

0 comments on commit fcb133e

Please sign in to comment.