git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] log: --remerge-diff needs to keep around commit parents

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 11, 2024, 01:52 UTC
Message-ID
<xmqq1pzik046.fsf@gitster.g>
In-Reply-To
<CABPp-BHauuserYU8t5ybn+ghqRb-c85qwwjLWVe-e5EC8sVVxQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 8 quoted lines
>> -               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.
Previous: Elijah NewrenNext: Junio C Hamano
Message 3 of 9 in “log: --remerge-diff needs to keep around commit parents”
  1. log: --remerge-diff needs to keep around commit parentsJohannes Schindelin via GitGitGadget, Nov 8, 2024
  2. Elijah NewrenNov 8, 2024
  3. Junio C HamanoNov 11, 2024
  4. Junio C HamanoNov 11, 2024
  5. Johannes SchindelinNov 11, 2024
  6. Junio C HamanoNov 11, 2024
  7. log: --remerge-diff needs to keep around commit parentsJohannes Schindelin via GitGitGadget, Nov 11, 2024
  8. log: --remerge-diff needs to keep around commit parentsJohannes Schindelin via GitGitGadget, Dec 12, 2024
  9. Junio C HamanoDec 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.