Re: [PATCH] log: --remerge-diff needs to keep around commit parents
From: Junio C Hamano <hidden>
Date: 2024-11-11 01:52:43
Elijah Newren [off-list ref] writes:
quoted
- if (!rev->reflog_info) { + if (!rev->reflog_info && !rev->remerge_diff) { /* * We may show a given commit multiple times when * walking the reflogs.Should this comment be updated to reflect the expanded rationale for this block's purpose?
Ah, we probably should. Especially if the newly discovered failure
mode is not due to having to show the same commit multiple times.
During reflog walk, we may show the same commit more than once,
so do not discard the parents. There may be a merge commit that
is descendent from the current commit, and in order to show it with
remerge-diff enabled, we need its ancestry chain, including our
parents, to compute the merge base.
or something? It is still not clear to me in what scenario a merge
commit, in a forward traversal, is shown _after_ one of its ancestor
commit is shown (and due to the memory optimization, loses its
parents).
Thanks, both.