Skip to content

Commit 651b443

Browse files
committed
Merge branch 'rs/reflog-expiry-cleanup' into maint-2.39
Code clean-up. * rs/reflog-expiry-cleanup: reflog: clear leftovers in reflog_expiry_cleanup()
2 parents dfd37b7 + b07a819 commit 651b443

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reflog.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb)
193193
commit_list_insert(commit, &leftover);
194194
continue;
195195
}
196-
commit->object.flags |= REACHABLE;
197196
parent = commit->parents;
198197
while (parent) {
199198
commit = parent->item;
@@ -371,6 +370,9 @@ void reflog_expiry_cleanup(void *cb_data)
371370
clear_commit_marks(cb->tip_commit, REACHABLE);
372371
break;
373372
}
373+
for (elem = cb->mark_list; elem; elem = elem->next)
374+
clear_commit_marks(elem->item, REACHABLE);
375+
free_commit_list(cb->mark_list);
374376
}
375377

376378
int count_reflog_ent(struct object_id *ooid UNUSED,

0 commit comments

Comments
 (0)