From 9f72435dce598cfa3e8805bc7ed2cb0b2d6a06d0 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Wed, 30 Sep 2026 21:16:36 -0400 Subject: [PATCH] migrate_bundled: a pre-moved submodule gitlink is not a dirty tree Retro Studio's bulk tab bumps the title's psxrecomp pin first so the script it runs is the one the title will pin; the clean-tree gate must not refuse that. Submodule-internal changes are still refused at bump time. Co-Authored-By: Claude Fable 5.1 --- tools/new_project_layout/project_studio/migrate_bundled.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/new_project_layout/project_studio/migrate_bundled.py b/tools/new_project_layout/project_studio/migrate_bundled.py index e422f8d9..96d80c21 100644 --- a/tools/new_project_layout/project_studio/migrate_bundled.py +++ b/tools/new_project_layout/project_studio/migrate_bundled.py @@ -172,7 +172,12 @@ def migrate_to_bundled_release(root: Path, opts: BundledMigrateOptions) -> CmdRe return fail("CMakeLists.txt does not use psxrecomp_add_game_runtime (migrate the layout first: migrate_project.py apply)") if not (root / "game.toml").is_file(): return fail("game.toml missing") - code, dirty = _run(["git", "status", "--porcelain", "--untracked-files=no"], root) + # Submodule gitlinks are exempt: a caller (Retro Studio's bulk tab) may + # have moved the psxrecomp pin already so this script exists in-title, and + # the pins are re-resolved below anyway. Content changes INSIDE a + # submodule are caught by _bump_submodule. + code, dirty = _run(["git", "status", "--porcelain", "--untracked-files=no", + "--ignore-submodules=all"], root) if dirty.strip() and not opts.dry_run: return fail("working tree has uncommitted changes; commit or stash them first:\n" + dirty.strip()[:600])