summaryrefslogtreecommitdiff
path: root/reflog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-02-14 14:15:56 -0800
committerJunio C Hamano <gitster@pobox.com>2023-02-14 14:15:56 -0800
commit651b4430d19c83e08360a3b647e5a37dfe12e834 (patch)
treecc9ebe040d4ef09bbb936389d3c0c0f69576e621 /reflog.c
parentdfd37b70b10bb55ed71dfc6c5d63feed22f9ffb0 (diff)
parentb07a819c05f47ac07dec9704c121a2cfb4857ebe (diff)
Merge branch 'rs/reflog-expiry-cleanup' into maint-2.39
Code clean-up. * rs/reflog-expiry-cleanup: reflog: clear leftovers in reflog_expiry_cleanup()
Diffstat (limited to 'reflog.c')
-rw-r--r--reflog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/reflog.c b/reflog.c
index 78e9350e20..04630f56ec 100644
--- a/reflog.c
+++ b/reflog.c
@@ -193,7 +193,6 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb)
commit_list_insert(commit, &leftover);
continue;
}
- commit->object.flags |= REACHABLE;
parent = commit->parents;
while (parent) {
commit = parent->item;
@@ -371,6 +370,9 @@ void reflog_expiry_cleanup(void *cb_data)
clear_commit_marks(cb->tip_commit, REACHABLE);
break;
}
+ for (elem = cb->mark_list; elem; elem = elem->next)
+ clear_commit_marks(elem->item, REACHABLE);
+ free_commit_list(cb->mark_list);
}
int count_reflog_ent(struct object_id *ooid UNUSED,