From: Junio C Hamano Date: Wed, 29 Mar 2006 01:28:04 +0000 (-0800) Subject: rev-list: memory usage reduction. X-Git-Tag: v1.3.0-rc2~33 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9181ca2c2b1f2897baa67ff8e48b1984822115b5;p=git.git rev-list: memory usage reduction. We do not need to track object refs, neither we need to save commit unless we are doing verbose header. A lot of traversal happens inside prepare_revision_walk() these days so setting things up before calling that function is necessary. Signed-off-by: Junio C Hamano Acked-by: Linus Torvalds --- diff --git a/rev-list.c b/rev-list.c index 441c4378..0903edbc 100644 --- a/rev-list.c +++ b/rev-list.c @@ -358,6 +358,9 @@ int main(int argc, const char **argv) (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) && !revs.pending_objects)) usage(rev_list_usage); + save_commit_buffer = verbose_header; + track_object_refs = 0; + prepare_revision_walk(&revs); if (revs.tree_objects) mark_edges_uninteresting(revs.commits); @@ -365,9 +368,6 @@ int main(int argc, const char **argv) if (bisect_list) revs.commits = find_bisection(revs.commits); - save_commit_buffer = verbose_header; - track_object_refs = 0; - show_commit_list(&revs); return 0;