Skip to content

Commit

Permalink
git-bundle: fix pack generation.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Mar 6, 2007
1 parent 31930b5 commit c044aa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin-bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ static void show_object(struct object_array_entry *p)
write_or_die(1, "\n", 1);
}

static void show_edge(struct commit *commit)
{
; /* nothing to do */
}

static int create_bundle(struct bundle_header *header, const char *path,
int argc, const char **argv)
{
Expand Down Expand Up @@ -341,6 +346,7 @@ static int create_bundle(struct bundle_header *header, const char *path,
dup2(in, 1);
close(in);
prepare_revision_walk(&revs);
mark_edges_uninteresting(revs.commits, &revs, show_edge);
traverse_commit_list(&revs, show_commit, show_object);
close(1);
while (waitpid(pid, &status, 0) < 0)
Expand Down

0 comments on commit c044aa1

Please sign in to comment.