merge_check: separate Git revisions from checkout paths (OLD-9973) #1226
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1226
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1226/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@IlyassRS3 on GitHub · 2026-11-24 20:36 UTC · original
IlyassRS3:carry/old-9973-merge-check-rev-paths→main· +21 −6 · 2 files · 1 commits · merged 2026-11-25 02:35 UTCWhat changed
Carries forward
old-pr/9973(draft #242, original commit by @nandanp1) rebased cleanly onto currentmain(f35d045cc), preserving the original author commit and retainingOLD-10032'sout.split("\n")line splitting inprior_merges.scripts/merge_check.py: append--after revision arguments ingit log,git diff, andgit showso working-tree files whose names collide with a branch name, commit/tree SHA, or<rev>:<path>spec do not trigger Git'sambiguous argument ... both revision and filenameerror.tests/test_merge_check.py: extendrun_checkto acceptmain=and assert exit code != 2 before JSON parsing; add collision subtests for working-tree files matchingmain, themaincommit SHA, the merged tree SHA, and (on POSIX)main:docs/notes.md; update thegit showmock list for the trailing--.Item ID
OLD-9973(carries forwardold-pr/9973/ draft #242, #17)Verification
Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14, Git (no game files, no GPU, standard library only):
python3 -I tests/test_merge_check.py -v-> 24/24 OKscripts/merge_check.pytoupstream/mainwhile keepingtests/test_merge_check.py) -> FAILED (6 failures), hitting Git'sfatal: ambiguous argument ...: both revision and filenameon all 4 collision cases (main, commit SHA, tree SHA,main:docs/notes.md) and bothshow ... --mock assertions; restoring the fix returns to 24/24 OK.python3 -m compileall -q scripts/merge_check.py tests/test_merge_check.py-> OKpython3 -I scripts/check_no_game_data.py scripts/merge_check.py tests/test_merge_check.py-> OKpython3 -I tests/test_ci_registration.py-> 15/15 OKpython3 -I tests/test_text_write_line_endings.py-> 3/3 OKChecklist
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-24 20:36 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@xel1uz on GitHub · 2026-11-24 20:48 UTC · original · approved these changes
I reproduced the ambiguity on upstream
mainwith the new regression test. A checkout file namedmain, a commit SHA, or a tree SHA triggered the Git error on Windows and Linux. On Linux,main:docs/notes.mddid too. Adding the--boundaries fixes all those cases and preserves the expected JSON result.python -I -B tests/test_merge_check.py -vpassed 24/24 on Windows and Ubuntu atd6031591. It also passed 24/24 on Ubuntu after a clean trial merge into66d4f5aa. I verified the carry-forward source against draft #242. Synthetic Git repositories, CPU only. AI-assisted review.@QemmHD on GitHub · 2026-11-25 02:35 UTC · original
Merging.
Why merged: merge_check passes git arguments after a
--boundary, so a path or ref that starts with-can't be read as an option. xel1uz approved it.Why it's good: Own tests: 24 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main
b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main3ff2a2adc(after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.AI-assisted (Claude Code, Claude Opus 5.5).