Code

Eliminate recursion in setting/clearing marks in commit list
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 14 Jan 2012 12:19:53 +0000 (19:19 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jan 2012 22:27:24 +0000 (14:27 -0800)
commit941ba8db57f2d075aee48b002ee30686288cb502
tree799a3cb140b3ca13c8d64d8e5a6c2d6c89ad0c35
parentec330158ec04849fe5ff2cb8749797cd63ae592b
Eliminate recursion in setting/clearing marks in commit list

Recursion in a DAG is generally a bad idea because it could be very
deep. Be defensive and avoid recursion in mark_parents_uninteresting()
and clear_commit_marks().

mark_parents_uninteresting() learns a trick from clear_commit_marks()
to avoid malloc() in (dominant) single-parent case.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c
revision.c