fix(tools): classify git bisect as a worktree mutation
bisect sat in _KNOWN_GIT_BUILTINS and was allowed in the running source root, yet it repeatedly checks out commits — the exact module-version skew this guard exists to prevent. Move it to _WORKTREE_MUTATIONS.
This commit is contained in:
parent
cd869f26f3
commit
daa139c9e3
|
|
@ -30,6 +30,8 @@ class TestBlocksMutationsInSourceRepo:
|
|||
[
|
||||
"checkout pr-51020",
|
||||
"switch main",
|
||||
"bisect start",
|
||||
"bisect good HEAD~10",
|
||||
"reset --hard origin/main",
|
||||
"reset --har origin/main",
|
||||
"rebase origin/main",
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ _WORKTREE_MUTATIONS = frozenset({
|
|||
"clean",
|
||||
"cherry-pick",
|
||||
"revert",
|
||||
# bisect drives repeated checkouts of the running root — the exact
|
||||
# module-version-skew hazard this guard exists for.
|
||||
"bisect",
|
||||
})
|
||||
_WORKTREE_TARGET_ACTIONS = frozenset({"move", "remove"})
|
||||
_STASH_SAFE_ACTIONS = frozenset({"list", "show", "create", "store", "drop", "clear"})
|
||||
|
|
@ -35,7 +38,6 @@ _KNOWN_GIT_BUILTINS = frozenset({
|
|||
"add",
|
||||
"am",
|
||||
"apply",
|
||||
"bisect",
|
||||
"blame",
|
||||
"branch",
|
||||
"bundle",
|
||||
|
|
|
|||
Loading…
Reference in New Issue