From: Junio C Hamano <gitster@pobox.com>
To: "Michael Montalbo via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
"Matthew Hughes" <matthewhughes934@gmail.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Michael Montalbo" <mmontalbo@gmail.com>
Subject: Re: [PATCH 1/2] line-log: fix crash when combined with pickaxe options
Date: Wed, 04 Mar 2026 12:01:18 -0800 [thread overview]
Message-ID: <xmqqh5qv74a9.fsf@gitster.g> (raw)
In-Reply-To: <6e97d88993dbab4070ac0aa999f70564368f47b1.1772651484.git.gitgitgadget@gmail.com> (Michael Montalbo via GitGitGadget's message of "Wed, 04 Mar 2026 19:11:23 +0000")
"Michael Montalbo via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Michael Montalbo <mmontalbo@gmail.com>
>
> queue_diffs() calls diffcore_std() to detect renames so that line-level
> history can follow files across renames. When pickaxe options are
> present on the command line (-G and -S to filter by text pattern,
> --find-object to filter by object identity), diffcore_std() also runs
> diffcore_pickaxe(), which may discard diff pairs that are relevant for
> rename detection. Losing those pairs breaks rename following.
Shouldn't that be solved not by omitting the necessary call to
diffcore_std(), but by using the "--pickaxe-all" option?
> Note that this only fixes the crash. The -G, -S, and --find-object
> options still have no effect on -L output because line-log uses its
> own commit-filtering logic that bypasses the normal pickaxe pipeline.
I do not know exactly what -L really wants to do, but from the look
at a patch like this, it smells like it is abusing the diffcore
machinery. If it wants to follow the rename history for individual
paths, even if the end-user's top-level command line option included
pickaxe or other fancy diffcore options, should it be *reusing* the
diff_options struct, prepared from the end-user request? Shouldn't
it rather be using its own diffopt crafted for that rename tracking
purpose, I have to wonder.
Thanks.
next prev parent reply other threads:[~2026-03-04 20:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 19:11 [PATCH 0/2] line-log: fix -L with pickaxe options Michael Montalbo via GitGitGadget
2026-03-04 19:11 ` [PATCH 1/2] line-log: fix crash when combined " Michael Montalbo via GitGitGadget
2026-03-04 20:01 ` Junio C Hamano [this message]
2026-03-04 22:33 ` Michael Montalbo
2026-03-04 19:11 ` [PATCH 2/2] log: reject pickaxe options when combined with -L Michael Montalbo via GitGitGadget
2026-03-04 19:21 ` [PATCH v2 0/2] line-log: fix -L with pickaxe options Michael Montalbo via GitGitGadget
2026-03-04 19:21 ` [PATCH v2 1/2] line-log: fix crash when combined " Michael Montalbo via GitGitGadget
2026-03-04 19:21 ` [PATCH v2 2/2] log: reject pickaxe options when combined with -L Michael Montalbo via GitGitGadget
2026-03-04 21:02 ` Junio C Hamano
2026-03-04 22:36 ` Michael Montalbo
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=xmqqh5qv74a9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=matthewhughes934@gmail.com \
--cc=mmontalbo@gmail.com \
--cc=szeder.dev@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