summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-05-11 14:03:15 -0400
committerJunio C Hamano <gitster@pobox.com>2018-05-13 11:33:09 +0900
commit8702b30fd7b6c804f1bb59877a4c2f773fbe00f8 (patch)
tree36e34a8e8bfb9ea98cb67396586393e093846d55 /commit.h
parent43fc643b75af91363eb1246528c706c1654ddc2e (diff)
mark_parents_uninteresting(): avoid most allocation
Commit 941ba8db57 (Eliminate recursion in setting/clearing marks in commit list, 2012-01-14) used a clever double-loop to avoid allocations for single-parent chains of history. However, it did so only when following parents of parents (which was an uncommon case), and _always_ incurred at least one allocation to populate the list of pending parents in the first place. We can turn this into zero-allocation in the common case by iterating directly over the initial parent list, and then following up on any pending items we might have discovered. 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