]> git.ipfire.org Git - thirdparty/git.git/commit - commit.c
commit: avoid allocation in clear_commit_marks_many()
authorRené Scharfe <l.s.r@web.de>
Mon, 25 Dec 2017 17:43:37 +0000 (18:43 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Dec 2017 21:50:05 +0000 (13:50 -0800)
commit07f7d55a346f0eb73a358736ce065f8c08b46452
treebf14544942a058b19df3530c5eee5eaa717114ad
parent3013dff8662eae06457fe6e5348dfe2270810ab2
commit: avoid allocation in clear_commit_marks_many()

Pass the entries of the commit array directly to clear_commit_marks_1()
instead of adding them to a commit_list first.  The function clears the
commit and any first parent without allocation; only higher numbered
parents are added to a list for later treatment.  This change extends
that optimization to clear_commit_marks_many().

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c