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

[PATCH 0/2] line-log: fix -L with pickaxe options

From
Michael Montalbo via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 4, 2026, 19:11 UTC
Message-ID
<pull.2061.git.1772651484.gitgitgadget@gmail.com>

This series fixes a crash in git log -L when combined with pickaxe options (-G, -S, or --find-object) on a history involving renames, reported in [1].

The crash bisects to a2bb801f6a (line-log: avoid unnecessary full tree diffs, 2019-08-21), which made the diffcore_std() call in queue_diffs() unconditional. Before that commit, the same combination silently truncated history at rename boundaries rather than crashing. The root cause is that diffcore_std() runs diffcore_pickaxe(), which may discard diff pairs needed for rename detection.

Patch 1 fixes the crash by calling diffcore_rename() directly instead of diffcore_std(), and adds tests including known-breakage markers showing that the pickaxe options are silently ignored by -L.

Patch 2 explicitly rejects the unsupported combination with die(), replacing the known-breakage tests with rejection tests.

[1] https://lore.kernel.org/git/aac-QdjY1ohAqgw_@desktop/
Michael Montalbo (2):
  line-log: fix crash when combined with pickaxe options
  log: reject pickaxe options when combined with -L
 builtin/log.c       |  4 ++++
 line-log.c          |  8 +++++++-
 t/t4211-line-log.sh | 15 +++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)
base-commit: 67ad42147a7acc2af6074753ebd03d904476118f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2061%2Fmmontalbo%2Ffix-line-log-G-crash-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2061/mmontalbo/fix-line-log-G-crash-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2061
-- 
gitgitgadget
Next: Michael Montalbo via GitGitGadget
Message 1 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.