git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>
Subject: [PATCH 0/3] Fix another crazy rename assertion
Date: Mon, 03 Nov 2025 18:01:45 +0000	[thread overview]
Message-ID: <pull.1992.git.1762192908.gitgitgadget@gmail.com> (raw)

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

             reply	other threads:[~2025-11-03 18:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 18:01 Elijah Newren via GitGitGadget [this message]
2025-11-03 18:01 ` [PATCH 1/3] t6429: update comment to mention correct tool Elijah Newren via GitGitGadget
2025-11-07 14:36   ` Kristoffer Haugsbakk
2025-11-07 22:40     ` Elijah Newren
2025-11-17  1:01       ` Junio C Hamano
2025-11-17 19:54         ` Elijah Newren
2025-11-17 22:10           ` Junio C Hamano
2025-11-03 18:01 ` [PATCH 2/3] merge-ort: remove debugging crud Elijah Newren via GitGitGadget
2025-11-03 18:01 ` [PATCH 3/3] merge-ort: fix failing merges in special corner case Elijah Newren via GitGitGadget

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=pull.1992.git.1762192908.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@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;
as well as URLs for NNTP newsgroup(s).