summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-12-13 07:20:09 +0100
committerJunio C Hamano <gitster@pobox.com>2022-12-13 22:06:26 +0900
commitb07a819c05f47ac07dec9704c121a2cfb4857ebe (patch)
tree7aae34e8a12177dbb8a24283d3ab6ea5a7d5040c /commit.c
parent8706a59933d09354c5e3eb09a543453655a97183 (diff)
downloadgit-b07a819c05f47ac07dec9704c121a2cfb4857ebe.tar.gz
reflog: clear leftovers in reflog_expiry_cleanup()
reflog_expiry_prepare() calls mark_reachable(), which recurively flags commits as REACHABLE. The traversal stops beyond a certain age threshold; the boundary commits also marked as REACHABLE and put back into mark_list at the end. unreachable() finishes the traversal down to the roots if necessary -- but if all interesting commits are younger than the age threshold then only recent commits need to be visited. When this optimization works then the boundary commits still sit there in mark_list at the end. Clear their REACHABLE flag and release the commit list allocations. While at it remove a duplicate code line from mark_reachable(); the same flag is already set five lines up. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions