From: Junio C Hamano Date: Sat, 18 Apr 2009 21:46:17 +0000 (-0700) Subject: Merge branch 'lt/pack-object-memuse' X-Git-Tag: v1.6.3-rc1~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9824a388e53ba0951e38f246038fa0ef6fda3397;p=git.git Merge branch 'lt/pack-object-memuse' * lt/pack-object-memuse: show_object(): push path_name() call further down process_{tree,blob}: show objects without buffering Conflicts: builtin-pack-objects.c builtin-rev-list.c list-objects.c list-objects.h upload-pack.c --- 9824a388e53ba0951e38f246038fa0ef6fda3397 diff --cc list-objects.c index 433394a10,30ded3d4d..8953548c0 --- a/list-objects.c +++ b/list-objects.c @@@ -134,18 -134,21 +134,22 @@@ void mark_edges_uninteresting(struct co } } + static void add_pending_tree(struct rev_info *revs, struct tree *tree) + { + add_pending_object(revs, &tree->object, ""); + } + void traverse_commit_list(struct rev_info *revs, show_commit_fn show_commit, - show_object_fn show_object) + show_object_fn show_object, + void *data) { int i; struct commit *commit; - struct object_array objects = { 0, 0, NULL }; while ((commit = get_revision(revs)) != NULL) { - process_tree(revs, commit->tree, &objects, NULL, ""); + add_pending_tree(revs, commit->tree); - show_commit(commit); + show_commit(commit, data); } for (i = 0; i < revs->pending.nr; i++) { struct object_array_entry *pending = revs->pending.objects + i; diff --cc list-objects.h index 47fae2e46,0b2de6430..d65dbf03e --- a/list-objects.h +++ b/list-objects.h @@@ -1,11 -1,11 +1,11 @@@ #ifndef LIST_OBJECTS_H #define LIST_OBJECTS_H -typedef void (*show_commit_fn)(struct commit *); +typedef void (*show_commit_fn)(struct commit *, void *); - typedef void (*show_object_fn)(struct object_array_entry *, void *); + typedef void (*show_object_fn)(struct object *, const struct name_path *, const char *); typedef void (*show_edge_fn)(struct commit *); -void traverse_commit_list(struct rev_info *revs, show_commit_fn, show_object_fn); +void traverse_commit_list(struct rev_info *, show_commit_fn, show_object_fn, void *); void mark_edges_uninteresting(struct commit_list *, struct rev_info *, show_edge_fn);