Skip to content
/ git Public
forked from git/git

Commit fcb133e

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74f8a9c commit fcb133e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

builtin/bundle.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ int cmd_bundle(int argc, const char **argv, const char *prefix)
5656
}
5757
if (!startup_info->have_repository)
5858
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);
6160
} else if (!strcmp(cmd, "unbundle")) {
6261
if (!startup_info->have_repository)
6362
die(_("Need a repository to unbundle."));

bundle.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ static int write_bundle_refs(int bundle_fd, struct rev_info *revs)
424424
return ref_count;
425425
}
426426

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)
429429
{
430430
struct lock_file lock = LOCK_INIT;
431431
int bundle_fd = -1;

bundle.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ struct bundle_header {
1818

1919
int is_bundle(const char *path, int quiet);
2020
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);
2323
int verify_bundle(struct repository *r, struct bundle_header *header, int verbose);
2424
#define BUNDLE_VERBOSE 1
2525
int unbundle(struct repository *r, struct bundle_header *header,

0 commit comments

Comments
 (0)