Mark Levedahl [off-list ref] writes:
However, a simple example:
git>git-rev-list --objects HEAD~1..HEAD
5ced0572217f82f20c4a3460492768e07c08aeea
1d30eaabe4b6f7218e4e4cfff5670a493aa7358e
2a1d6a2be1511f65b601897f05962e5f673257d8 contrib
cbd77b2f57114d4fa2f119f1b1ee17968d6d67d4 contrib/emacs
8554e3967cc692c6916e5aee35952074d07e8bf0 contrib/emacs/Makefile
shows that the bundle for this case should have five objects as
shown. In this case, 916 objects are actually included in the pack
when executing
git bundle create test.bdl HEAD~1..HEAD
Indeed. The internal rev-list reimplemented in builtin-bundle.c
lacks the code to mark trees and blobs in commits that are on
the other side of the edge uninteresting.
This is on top of the patches I send to the list and Dscho
earlier.
--
builtin-bundle.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 4fe74a7..199a30d 100644
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
@@ -278,6 +278,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)
{@@ -361,6 +366,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)