]> git.ipfire.org Git - thirdparty/git.git/commit
commit: avoid parent list buildup in clear_commit_marks_many()
authorRené Scharfe <l.s.r@web.de>
Sun, 23 Feb 2025 08:26:04 +0000 (09:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2025 16:51:18 +0000 (08:51 -0800)
commit1ca727f230d83db20952f8ae7ce2f1749d744334
tree8d2d35e04f4d5295504df886f1c3a1f00a112255
parent2d2a71ce85026edcc40f469678a1035df0dfcf57
commit: avoid parent list buildup in clear_commit_marks_many()

clear_commit_marks_1() clears the marks of the first parent and its
first parent and so on, and saves the higher numbered parents in a list
for later.  There is no benefit in keeping that list growing with each
handled commit.  Clear it after each run to reduce peak memory usage.

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