From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] log: --remerge-diff needs to keep around commit parents
Date: Mon, 11 Nov 2024 10:52:41 +0900 [thread overview]
Message-ID: <xmqq1pzik046.fsf@gitster.g> (raw)
In-Reply-To: <CABPp-BHauuserYU8t5ybn+ghqRb-c85qwwjLWVe-e5EC8sVVxQ@mail.gmail.com> (Elijah Newren's message of "Fri, 8 Nov 2024 07:47:04 -0800")
Elijah Newren <newren@gmail.com> writes:
>> - 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.
next prev parent reply other threads:[~2024-11-11 1:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 13:43 [PATCH] log: --remerge-diff needs to keep around commit parents Johannes Schindelin via GitGitGadget
2024-11-08 15:47 ` Elijah Newren
2024-11-11 1:52 ` Junio C Hamano [this message]
2024-11-11 1:46 ` Junio C Hamano
2024-11-11 18:32 ` Johannes Schindelin
2024-11-11 22:13 ` Junio C Hamano
2024-11-11 18:33 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2024-12-12 10:29 ` [PATCH v3] " Johannes Schindelin via GitGitGadget
2024-12-13 15:02 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1pzik046.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=j6t@kdbg.org \
--cc=johannes.schindelin@gmx.de \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).