Skip to content

Commit c044aa1

Browse files
author
Junio C Hamano
committed
git-bundle: fix pack generation.
The handcrafted built-in rev-list lookalike forgot to mark the trees and blobs contained in the boundary commits uninteresting, resulting in unnecessary objects in the pack. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 31930b5 commit c044aa1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin-bundle.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ static void show_object(struct object_array_entry *p)
263263
write_or_die(1, "\n", 1);
264264
}
265265

266+
static void show_edge(struct commit *commit)
267+
{
268+
; /* nothing to do */
269+
}
270+
266271
static int create_bundle(struct bundle_header *header, const char *path,
267272
int argc, const char **argv)
268273
{
@@ -341,6 +346,7 @@ static int create_bundle(struct bundle_header *header, const char *path,
341346
dup2(in, 1);
342347
close(in);
343348
prepare_revision_walk(&revs);
349+
mark_edges_uninteresting(revs.commits, &revs, show_edge);
344350
traverse_commit_list(&revs, show_commit, show_object);
345351
close(1);
346352
while (waitpid(pid, &status, 0) < 0)

0 commit comments

Comments
 (0)