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

Re: [PATCH 1/2] line-log: fix crash when combined with pickaxe options

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 4, 2026, 20:01 UTC
Message-ID
<xmqqh5qv74a9.fsf@gitster.g>
In-Reply-To
<6e97d88993dbab4070ac0aa999f70564368f47b1.1772651484.git.gitgitgadget@gmail.com>
"Michael Montalbo via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> 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.
Previous: Michael Montalbo via GitGitGadgetNext: Michael Montalbo
Message 3 of 10 in “line-log: fix -L with pickaxe options”
  1. 0/2 line-log: fix -L with pickaxe optionsMichael Montalbo via GitGitGadget, Mar 4, 2026
  2. 1/2 line-log: fix crash when combined with pickaxe optionsMichael Montalbo via GitGitGadget, Mar 4, 2026
  3. Junio C HamanoMar 4, 2026
  4. Michael MontalboMar 4, 2026
  5. 2/2 log: reject pickaxe options when combined with -LMichael Montalbo via GitGitGadget, Mar 4, 2026
  6. 0/2 line-log: fix -L with pickaxe optionsMichael Montalbo via GitGitGadget, Mar 4, 2026
  7. 1/2 line-log: fix crash when combined with pickaxe optionsMichael Montalbo via GitGitGadget, Mar 4, 2026
  8. 2/2 log: reject pickaxe options when combined with -LMichael Montalbo via GitGitGadget, Mar 4, 2026
  9. Junio C HamanoMar 4, 2026
  10. Michael MontalboMar 4, 2026

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.