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

[PATCH 0/3] Fix another crazy rename assertion

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 3, 2025, 18:01 UTC
Message-ID
<pull.1992.git.1762192908.gitgitgadget@gmail.com>

This fixes another special corner case that was being triggered at GitHub; the error being triggered is the same as what I submitted a fix for a few months ago, but the way it was triggered and the fix needed are different in this case. See the final commit message for details. The first two patches are just tiny cleanups I noticed while investigating the problem.

I will also note that I first came up with an alternative fix -- checking in use_cached_pairs() whether new_name was contained in the opt->priv->paths strmap, and if not, skipping to the next cached rename instead of adding it to pairs. That would also work, but it would mean that if a yet-subsequent commit after that did modify the old/file path, I think we'd have to re-detect the rename, which would hurt the effectiveness of the cached renames optimization. Simply avoiding using it in process_renames() allows it to avoid being forgotten (and since old/file is NOT modified, the upstream rename remains valid). Besides, this fix is nicely symmetrical to the check on !oldinfo, so it seems more aesthetic to me as well as helping us preserve performance.

Elijah Newren (3):
  t6429: update comment to mention correct tool
  merge-ort: remove debugging crud
  merge-ort: fix failing merges in special corner case
 merge-ort.c                              | 31 +++++++-
 t/t6429-merge-sequence-rename-caching.sh | 93 ++++++++++++++++++++++--
 2 files changed, 114 insertions(+), 10 deletions(-)
base-commit: 4253630c6f07a4bdcc9aa62a50e26a4d466219d1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1992%2Fnewren%2Ffix-another-crazy-rename-assertion-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1992/newren/fix-another-crazy-rename-assertion-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1992
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 9 in “Fix another crazy rename assertion”
  1. 0/3 Fix another crazy rename assertionElijah Newren via GitGitGadget, Nov 3, 2025
  2. 2/3 merge-ort: remove debugging crudElijah Newren via GitGitGadget, Nov 3, 2025
  3. 3/3 merge-ort: fix failing merges in special corner caseElijah Newren via GitGitGadget, Nov 3, 2025
  4. 1/3 t6429: update comment to mention correct toolElijah Newren via GitGitGadget, Nov 3, 2025
  5. Kristoffer HaugsbakkNov 7, 2025
  6. Elijah NewrenNov 7, 2025
  7. Junio C HamanoNov 17, 2025
  8. Elijah NewrenNov 17, 2025
  9. Junio C HamanoNov 17, 2025

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.