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 <junkio@cox.net>
Junio C Hamano committed
Mar 5, 2007 at 22:48 UTC
c044aa18f68bcba4f7ec6fd625eb48c2520a1bb1
1 file changed
+6
builtin-bundle.c
+6
@@ -263,6 +263,11 @@ static void show_object(struct object_array_entry *p)
263
write_or_die(1, "\n", 1);
264
}
265
266
+static void show_edge(struct commit *commit)
267
+{
268
+ ; /* nothing to do */
269
+}
270
+
271
static int create_bundle(struct bundle_header *header, const char *path,
272
int argc, const char **argv)
273
{
@@ -341,6 +346,7 @@ static int create_bundle(struct bundle_header *header, const char *path,
346
dup2(in, 1);
347
close(in);
348
prepare_revision_walk(&revs);
349
+ mark_edges_uninteresting(revs.commits, &revs, show_edge);
350
traverse_commit_list(&revs, show_commit, show_object);
351
close(1);
352
while (waitpid(pid, &status, 0) < 0)