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>
This commit is contained in:
parent
74f8a9c954
commit
fcb133e978
@ -56,8 +56,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
|
|||||||
}
|
}
|
||||||
if (!startup_info->have_repository)
|
if (!startup_info->have_repository)
|
||||||
die(_("Need a repository to create a bundle."));
|
die(_("Need a repository to create a bundle."));
|
||||||
return !!create_bundle(the_repository, &header,
|
return !!create_bundle(the_repository, bundle_file, argc, argv);
|
||||||
bundle_file, argc, argv);
|
|
||||||
} else if (!strcmp(cmd, "unbundle")) {
|
} else if (!strcmp(cmd, "unbundle")) {
|
||||||
if (!startup_info->have_repository)
|
if (!startup_info->have_repository)
|
||||||
die(_("Need a repository to unbundle."));
|
die(_("Need a repository to unbundle."));
|
||||||
|
4
bundle.c
4
bundle.c
@ -424,8 +424,8 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
|
|||||||
return ref_count;
|
return ref_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int create_bundle(struct repository *r, struct bundle_header *header,
|
int create_bundle(struct repository *r, const char *path,
|
||||||
const char *path, int argc, const char **argv)
|
int argc, const char **argv)
|
||||||
{
|
{
|
||||||
struct lock_file lock = LOCK_INIT;
|
struct lock_file lock = LOCK_INIT;
|
||||||
int bundle_fd = -1;
|
int bundle_fd = -1;
|
||||||
|
4
bundle.h
4
bundle.h
@ -18,8 +18,8 @@ struct bundle_header {
|
|||||||
|
|
||||||
int is_bundle(const char *path, int quiet);
|
int is_bundle(const char *path, int quiet);
|
||||||
int read_bundle_header(const char *path, struct bundle_header *header);
|
int read_bundle_header(const char *path, struct bundle_header *header);
|
||||||
int create_bundle(struct repository *r, struct bundle_header *header,
|
int create_bundle(struct repository *r, const char *path,
|
||||||
const char *path, int argc, const char **argv);
|
int argc, const char **argv);
|
||||||
int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
|
int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
|
||||||
#define BUNDLE_VERBOSE 1
|
#define BUNDLE_VERBOSE 1
|
||||||
int unbundle(struct repository *r, struct bundle_header *header,
|
int unbundle(struct repository *r, struct bundle_header *header,
|
||||||
|
Loading…
Reference in New Issue
Block a user