diff options
| author | Elijah Newren <newren@gmail.com> | 2026-04-20 22:30:14 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-22 16:21:05 -0700 |
| commit | b2eec6663f10a53dead5e7a4e5e9b91220bf9473 (patch) | |
| tree | 36ea9d47219040e46943aee4ca2e1b41a72063c5 /contrib/persistent-https | |
| parent | 94f057755b7941b321fd11fec1b2e3ca5313a4e0 (diff) | |
| download | git-b2eec6663f10a53dead5e7a4e5e9b91220bf9473.tar.gz git-b2eec6663f10a53dead5e7a4e5e9b91220bf9473.zip | |
merge-ort: handle cached rename & trivial resolution interaction better
Back in commit a562d90a350d (merge-ort: fix failing merges in special
corner case, 2025-11-03), we hit a rename assertion due to a trivial
directory resolution affecting the parent of a cached rename. Since
the path didn't need to be considered, we side-stepped it with
if (!newinfo)
continue;
in process_renames(). We have since run into a case in production
where a trivial resolution of a file affects the direct target of a
cached rename rather than a parent directory of it. Add a testcase
demonstrating this additional case.
Now, if we were to follow the lead of commit a562d90a350d, we could
resolve this alternate case with an extra condition on the above if:
if (!newinfo || newinfo->merged.clean)
continue;
However, if we had done that earlier, we would have made 979ee83e8a90
(merge-ort: fix corner case recursive submodule/directory conflict
handling, 2025-12-29) harder to find and fix, and this particular
position for this condition isn't actually at the root of the issue
but downstream from it.
Instead, let's rip out this if-check from a562d90a350d and put in an
alternative that more directly addresses trivially resolved paths that
happen to be cached renames or parent directories thereof, which is a
better fix for the original testcase and which also solves the newly
added testcase as well.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
