diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-01-09 10:59:04 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-09 12:41:46 -0800 |
commit | 926fef2de27f8e3b1bb0fe5029266af0a97cb9d1 (patch) | |
tree | 799a3cb140b3ca13c8d64d8e5a6c2d6c89ad0c35 /builtin/show-ref.c | |
parent | ec330158ec04849fe5ff2cb8749797cd63ae592b (diff) | |
download | git-926fef2de27f8e3b1bb0fe5029266af0a97cb9d1.tar.gz |
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 (dorminant) 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>
Diffstat (limited to 'builtin/show-ref.c')
0 files changed, 0 insertions, 0 deletions