From: Junio C Hamano <gitster@pobox.com>
To: Toon Claes <toon@iotcl.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH v3] last-modified: fix bug when some paths remain unhandled
Date: Thu, 18 Sep 2025 08:18:06 -0700 [thread overview]
Message-ID: <xmqqy0qb94cx.fsf@gitster.g> (raw)
In-Reply-To: <20250918-toon-fix-last-modified-v3-1-0c3910e224f6@iotcl.com> (Toon Claes's message of "Thu, 18 Sep 2025 10:00:08 +0200")
Toon Claes <toon@iotcl.com> writes:
> The recently introduced new subcommand git-last-modified(1) runs into an
> error in some scenarios. It then would exit with the message:
>
> BUG: paths remaining beyond boundary in last-modified
>
> This seems to happens for example when criss-cross merges are involved.
"seems to happens for example when" -> "seems to happen, for
example, when".
"In some scenarios" followed by "seems to" is not particularly
convincing that we know what the cause of the problem, though.
> In that scenario, the function diff_tree_combined() gets called.
and in a simpler history that does not exhibit the problem, we
traverse without calling diff_tree_combined()? What do we use
instead?
> The function diff_tree_combined() copies the `struct diff_options` from
> the input `struct rev_info` to override some flags. One flag is
> `recursive`, which is always set to 1. This has been the case since the
> inception of this function in af3feefa1d (diff-tree -c: show a merge
> commit a bit more sensibly., 2006-01-24).
>
> This behavior is incompatible with git-last-modified(1), when called
> non-recursive (which is the default).
"non-recursively"?
> Changes in v3:
> - Instead of changing diff_tree_combined()'s default behavior, add a
> flag to modify it's behavior.
> - Overhaul the commit message to match the change in strategy.
> - Link to v2: https://lore.kernel.org/r/20250905-toon-fix-last-modified-v2-1-d859eeed408e@iotcl.com
I agree that this surgical approach may be the safest without
risking regression to all other callers.
Will queue on top of recent 'master' that already has the
tc/last-modified topic.
Thanks.
prev parent reply other threads:[~2025-09-18 15:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 13:06 [PATCH v2] combine-diff: don't override recursive flag in diff_tree_combined() Toon Claes
2025-09-05 15:27 ` Junio C Hamano
2025-09-05 15:37 ` Kristoffer Haugsbakk
2025-09-08 12:19 ` Toon Claes
2025-09-16 7:11 ` Patrick Steinhardt
2025-09-16 15:22 ` Toon Claes
2025-09-18 5:49 ` Patrick Steinhardt
2025-09-18 8:00 ` [PATCH v3] last-modified: fix bug when some paths remain unhandled Toon Claes
2025-09-18 15:18 ` Junio C Hamano [this message]
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=xmqqy0qb94cx.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=toon@iotcl.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).