diff options
author | Jeff King <peff@peff.net> | 2018-05-11 14:02:27 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-13 11:23:59 +0900 |
commit | 43fc643b75af91363eb1246528c706c1654ddc2e (patch) | |
tree | 405c4d4b7c6e16ec2cabbd276541bf4b2e7a33d1 /commit.h | |
parent | 577dd0d29bf7cbbdf1f00c20a90caac50b1c603f (diff) |
mark_parents_uninteresting(): replace list with stack
The mark_parents_uninteresting() function uses two loops:
an outer one to process our queue of pending parents, and an
inner one to process first-parent chains. This is a clever
optimization from 941ba8db57 (Eliminate recursion in
setting/clearing marks in commit list, 2012-01-14) to limit
the number of linked-list allocations when following
single-parent chains.
Unfortunately, this makes the result a little hard to read.
Let's replace the list with a stack. Then we don't have to
worry about doing this double-loop optimization, as we'll
just reuse the top element of the stack as we pop/push.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions