提交 9181ca2c 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <junkio@cox.net>
Acked-by: NLinus Torvalds <torvalds@osdl.org>
上级 5cdeae71
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册