commit | 941ba8db57f2d075aee48b002ee30686288cb502 | [log] [tgz] |
---|---|---|
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | Sat Jan 14 19:19:53 2012 +0700 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Jan 16 14:27:24 2012 -0800 |
tree | 799a3cb140b3ca13c8d64d8e5a6c2d6c89ad0c35 | |
parent | ec330158ec04849fe5ff2cb8749797cd63ae592b [diff] |
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>