Repository navigation
fix(guard-bash): resolve path arguments through one resolver (closes #3988) - #3997
Conversation
apmantza#3988) The `git worktree remove` rule resolved its path argument without the shell expansion bash applies first, so `~/wt`, `$HOME/wt` and `${HOME}/wt` were treated as paths relative to cwd, looksLikeGitWorktree failed, and a worktree whose node_modules symlinks outside it was removed unchecked. Expand a leading `~`, `$HOME` or `${HOME}` from the hook's HOME before the absolute/relative resolution. The expansion is a separate helper so the $TMPDIR substitution for `git worktree add` keeps its own variable lookup.
|
Thanks for your first pull request! A maintainer will review it soon. Please make sure CI passes and the PR template is filled out. |
|
Thanks, this is the #3988 fix we filed this session. A maintainer round will push to this branch (maintainer edits are allowed):
Open PR #3949 changes the same file for the coproc-label class. The two rounds will be kept compatible. |
The apmantza#3173 node_modules-symlink guard resolved a `git worktree remove` path literally, so `~/wt`, `$HOME/wt`, a relative path after `cd`/`git -C`, and any `$VAR` or `$(...)` spelling failed open. The tmp-checkout, mktemp and node-probe rules each carried a partial expander of their own with the same hole. One resolver now serves them all: expandShellWord expands `~`, `$VAR`, `${VAR}` and `$PWD` as bash would, resolveShellPath anchors the result on the command's effective cwd (a preceding cd/pushd, every `git -C`, else the payload cwd; a subshell's cd does not leak). expandHomePrefix, expandShellHome, substituteTempDirPrefix and pathResolvesUnderTmp are deleted. lexRegions leaves a placeholder where it drops a `$(...)` or backtick span so a word that held one is not read as a shorter path. A `git worktree remove` path that cannot be resolved statically now fails closed with `worktreeUnresolved`; the tmp-checkout hygiene rules stay fail-open on it. Six historical orchestrator loop-variable removes in the transcript corpus are now expected denies. Closes apmantza#3988. Co-Authored-By: Claude Opus 5.5 <[email protected]>
oxfmt had rewritten the "" escape to the raw private-use character, an invisible byte sequence in the source. Build it with String.fromCharCode(0xe000) so the formatter leaves it readable (apmantza#3988). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Maintainer round pushed to this branch (head b950180; contributor commit 821e37d kept, authorship preserved).
CI on this head is still running ( |
|
thanks @drakeo338. appreciate the PR. done some extra work on it, hope that's OK. merging soon. |
|
Review (on the real hook, plus a combined tree with #3949): needs changes. Thanks for the fix; the path resolver itself is the right seam. The findings below come from probes through the real hook entry, with a logging bash/git stub. Regressions introduced by the U+E000 substitution mark:
Fail-open cases:
Plan (orchestrator): #3949 merges first. Then one maintainer round here, pushed to this branch, opening with a state-space table: keep the mark out of rule-matched word text (F1), register it as a dynamic expansion in |
|
Status: this is waiting on #3949, which merges first. After that, one maintainer round here, as posted above. It resolves the overlap the review found by subsuming the U+E000 mark into #3949's coproc-label handling, and folds F1–F7. Your resolver design stays; the round fixes the fail-open cases and re-pins the transcript corpus. |
# Conflicts: # scripts/hooks/guard-bash.mjs
Treat lexer substitution marks as dynamic expansions so rule words remain matchable and coproc labels remain scannable. Fail closed for indirect substitutions, volatile ambient paths, bounded chains, brace expansion, and symlink-sensitive parent traversal.\n\nRefs apmantza#3997. Closes apmantza#3988.
|
Maintainer status (2026-10-07): the round-2 verify found regressions in c0184f1: inline-env hook bypass, |
A command substitution's output is not statically known. findDeny now scans a command that holds one twice and denies if either reading does: with the U+E000 mark kept as opaque word text (no rule word matches it, no path resolves through it), then with the marks removed (the text master scanned, where bash drops an empty unquoted word). This replaces the three call-site strips and stripSubstitutionMark, which left `git $(:) stash`, `npm$(:) run lint; git$(:) commit`, `mktemp $(:)-d` and the whole-word `git worktree remove "$(cat f)"` open. classifyGit takes git's env (inline prefix included, so HUSKY=0 and PI_LENS_SKIP_HOOKS deny again) and, separately, the shell variables its path words were expanded with; the __PI_LENS_INLINE_HOME sentinel is gone. A path git or mktemp hands the kernel resolves physically (measured: git removed the tree `lnk` pointed at for `lnk/../wt`); a cd target stays logical, as bash resolves it. The chain expander drops the identifier-valued pre-loop, restores the cap of 8 and expands a tilde surfaced by the last hop. The -C walk is computed once in classifyGit (gitInvocationCwd deleted): 49 top-level functions, as on master. AGENTS.md gains numbered shape 61 (the shape-count pin in agents-governance moves to 61), and the two changelog fragments fold into one. Refs apmantza#3997. Closes apmantza#3988. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
|
Maintainer decisions on round 4 (head 6384cac, 2026-10-07):
|
Round 3 of #4044 after #3997 merged. An unknown cwd (a cd the scan could not resolve) is judged as the payload cwd; delete operands and --prefix go through resolveShellPath in logical mode; find -L/-follow descent, unlisted npm value flags, the unlink wording and the typos aliases. Refs #4044 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
apmantza#4057) Since the prefix stopped expanding mktemp's typed words, a `-p` or `--tmpdir=` value that is one variable the shell does not have stayed unexpanded and resolved under the cwd, so `D=/tmp/lane mktemp -d -p $D y.XXXXXX` allowed. Master denied it by expanding the prefix's `D`. Bash expands that word to nothing, and GNU mktemp reads an empty `-p` or `--tmpdir=` value as its own `$TMPDIR`, else /tmp. A template word that vanishes leaves no template, which defaults there too. classifyMktemp now reads such a word twice, as findDeny reads a substitution since apmantza#3997: as written, and as empty, where it judges mktemp's `$TMPDIR` sentinel with mktemp's own env. The first reading that lands under /tmp denies. Quotes are gone by then, so `-p "$D"` and `-p $D` read alike. Eight rows pin the empty readings, seven of them red at the previous head. Two more rows give `-t` and bundled `-dt` their missing direction. The remaining mktemp-default comments say GNU mktemp.
#4057) Bash expands a command's words before an inline `VAR=val` prefix reaches the program, so `TMPDIR=/x mktemp -d $TMPDIR/y` expands `$TMPDIR` from the shell's own value. Since #3997 git's path words use the shell's variables (`sharedEnv`), but mktemp and node still read the prefixed env for their path words. Pass `sharedEnv` to classifyMktemp and classifyNode as `expansionEnv`, the same seam classifyGit uses. Typed words now expand from it: a mktemp template, a `-p` or `--tmpdir=` value, and node's file argument. Values the program reads from its own env keep the prefix: mktemp's `$TMPDIR` default (no template, `-t` with a relative template, bare `--tmpdir`) and node's `PI_LENS_HOME`. Each `-p` or `--tmpdir` value records the env it expands with, so the last one given still wins. The new rows run the real hook with an explicit ambient TMPDIR, HOME or variable, in both directions. Fourteen are red on master. The controls for the default directory and PI_LENS_HOME pass on both.



Why
A
git worktree removepath spelled with~,$HOME,$VAR, a relative path aftercd/git -C, a..through a symlink, or$(...)no longer slips past the #3173 shared-node_modules guard, and no command substitution beside a rule word hides a command master denied.Notes for the reviewer
~/$HOME/${HOME}on the remove path) is kept with its authorship; maintainer rounds sit on top. Round 4 is one commit,fix(guard-bash): two substitution readings (#3988), after a merge oforigin/master.r4column is now measured on this head: 133 of 133 cells give the expected rule.git worktree removeonly. The tmp-checkout hygiene rules stay fail-open on it.VAR=valprefix, because bash expands the words first (measured:TMPDIR=/home/dev/scratch printf %s "$TMPDIR/foo"prints the shell's value). SoTMPDIR=/tmp git worktree add $TMPDIR/xnow allows when the ambient TMPDIR is off /tmp, where master denied: the tree really lands under the ambient TMPDIR. In the differential fuzz below this family is the only master deny that becomes an allow, and only with an off-/tmp ambient TMPDIR (0 with TMPDIR unset, the CI shape). TheTMPDIR=row in the test file is re-pinned in both shapes.worktreeUnresolved(66 expected corpus denies, as pinned in round 3). The sanctioned bulk removal isnode scripts/prune-agent-worktrees.mjs.Change outline
Summary
Closes #3988. Every acceptance criterion holds after this round:
~,$HOME,${HOME}and relative paths resolve against the command's effective cwd before the check; an unresolvable path fails closed with the named ruleworktreeUnresolved(rows "fails closed (named rule) on an unresolvable path", "round 4 remove cell").rmhas no rule).Root cause of the round-3 regressions: c0184f1 kept the substitution mark in word text and stripped it at three call sites. Stripping turned a whole-word substitution into
"", which skipped the remove check (H2), and the other word consumers (checkUngated,mktempflags, a split word) still saw the mark. The inline-HOME fix handedclassifyGitan env without the inline prefix, so the hook-bypass check lostHUSKY=0(H1). The..guard compared the lexically normalized path with its own realpath, which is never the kernel's path (H3).The rule (derived from the table; full text in "Round 4"): a substitution's output is unknown, so
findDenyreads a command that holds one twice, first with the mark as opaque word text, then with the marks removed, and denies if either reading denies.scripts/hooks/guard-bash.mjs:2609Git's own env and its path words' env are now separate parameters:
scripts/hooks/guard-bash.mjs:2190A path a program hands the kernel resolves physically; a
cdtarget stays logical:scripts/hooks/guard-bash.mjs:1242Type of change
Area
Checklist
npm run build; the full suite is CI's job.npm run lintpassesnpm run build:distsucceeds if I changed code underclients/,commands/,tools/, orindex.tspackage-lock.jsonis in sync withpackage.json(regenerate with the exact npm pin inpackage.json'spackageManagerfield)AGENTS.mdis updated if this PR changes behavior, commands, conventions, or invariants documented there.changelog/<branch-or-slug>-<short-desc>.mdhas one valid entry in this PR for any user-facing change (Added/Changed/Deprecated/Removed/Fixed/Security), withaudience: useroraudience: internal— see .changelog/README.md; internal-only test/refactor PRs may skip it(closes #NNN)or(refs #NNN)Tests
Round 4,
tests/scripts/guard-bash-hook.test.ts, all throughrunHook(stdin JSON, exit code, stderr compared withRULE_MESSAGES):ROUND4_REMOVE_ROWSin the describe "path-argument resolver (guard-bash: #3173 shared-node_modules worktree-remove guard misses ~/ and $HOME/ path spellings #3988)": H2 (whole-word$(...)/backticks,--force/--then"$(...)", a$(...)word before the path, unquotedgit -C $(pwd)), H3 (symlink then..: relative,$PWD, aftergit -C, as the-Cdirectory, aftercd; plus the allow row "a cd target stays logical"), F4 (HOME=inline), F5 (8-variable chain resolves, 9-variable chain fails closed, identifier-valued variable is a literal word). The fixture gainsHOME/away/lnk -> ../scratch/wt; no newgitspawn.checkUngated,mktemp,worktree add,clone, and H1 with a substitution) and 3 allow rows (git commit -m "$(cat msg.txt)",echo $(git rev-parse HEAD),git -C "$(...)" status).HOME=and fake-chain rows (moved, with bash-correct verdicts, toROUND4_REMOVE_ROWS); "keeps a substitution mark from fusing into the surrounding rule word (fix(guard-bash): resolve path arguments through one resolver (closes #3988) #3997 F1)" loses itssplitWordsline, which asserted the mark's own placement and passed on the pre-round source.tests/config/agents-governance.test.ts: the shape-count pin moves 60 -> 61 for the new numbered shape 61.Red on c0184f1 (the round-4 test file against c0184f1's hook;
-t "round 4|#3997|3778|hook bypass|inline TMPDIR|whole path from a quoted"):Not red on c0184f1, kept as pins: "H2 an unquoted $(...) as the git -C directory", "H3 a cd target stays logical", "F5 a 9-variable $ chain fails closed at the bound", the three allow rows, and the re-pinned TMPDIR row (c0184f1's verdict there is ambient-dependent:
tmpCheckoutwith TMPDIR/tmpor unset,nullwith an off-/tmp TMPDIR, measured throughfindDenyon c0184f1's hook).Green on this head:
tests/scripts/guard-bash-hook.test.tsTests 992 passed (992),Duration 148.99s; corpus lineguard-bash transcript corpus: 1122 rows, 66 expected denies, 88332ms(cap 180 000 ms). The TMPDIR row passes with TMPDIR unset and with the lane TMPDIR. Governance batch (ls tests/clients/*{sweep,ratchet,conformance,coverage,gate,governance,silence,hermeticity,invariant,contract}*.test.tsplustests/config/*.test.ts, 134 files) throughnpm run test:targeted:Test Files 134 passed (134),Tests 1871 passed | 1 skipped (1872).tests/scripts/stryker-diff.test.tsandtests/scripts/pr-worktree.test.ts: 165 passed.npm run lint(pre-commit),npx oxfmt --checkon every touched file,npm run astgrep:self-scan(clean: 0 finding(s)),node scripts/check-changelog-fragments.mjs(changelog fragments OK) all pass.Mutations (compile-valid,
scripts/hooks/guard-bash.mjsmutated in place and restored withgit checkout HEAD --; filter: the whole file minus the corpus, baseline991 passed | 1 skipped):splitWords, one reading$(...) inside the path,whole path from a quoted $(...),relative path after cd $(...), every H2 row$(printf C)/backtick coproc label rows$reason offgit -Cwalk off-Cdeny, unresolved and tmp-checkout rows)$(printf C)/backtick coproc label rowscddoes not leak out"One guard was mutation-inert and was deleted: the
..condition on the physical step (forcing a realpath on every non-cd path changed no verdict in the file or the corpus), so every path git or mktemp hands the kernel resolves physically.Differential fuzz against
origin/master(in-processfindDeny, 34 seeds,$(:), backticks,$(printf x),"$(:)"inserted at every word boundary, every character position and every word end; 3586 variants, payload cwd off /tmp):All 155 are the
TMPDIR=/tmp git worktree add $TMPDIR/xfamily (decision note above). The 306 added denies are 303tmpCheckoutfrom theTMPDIR=/tmp mktemp -d $TMPDIR/x.XXXXfamily (Residuals) and 3 contrivedcoproc $(:) C { … }rows.Test assessment
tests/scripts/guard-bash-hook.test.tspins the hook's decisions through the real entry. Removed: thesplitWordsassertion on the mark's own placement (vacuous: it passed on the pre-round source and pinned the implementation), and the two F3-F6 rows that asserted non-bash verdicts (an inlineHOME=is not the expansion HOME;A=B; … $Ais the literal wordB); their shapes survive inROUND4_REMOVE_ROWS, where M4 and the F5 rows red.tests/config/agents-governance.test.ts: count pin only.Blast radius
scripts/hooks/guard-bash.mjsonly, plus tests,AGENTS.md(numbered shape 61 and one line in "Git guard and host adapters"), one changelog fragment (the round-3 second fragment is deleted). Callers above:run->classifyPayload->findDeny;findDeny->classifySegment->classifyGit,classifyMktemp,classifyNode;findDeny->cwdAfterSegment. Callees below:resolveShellPath(callers: the-Cwalk, remove, add, clone inclassifyGit;classifyMktemp;cwdAfterSegment),expandShellWord(resolveShellPath,classifyMktemp,classifyNode),lookupShellVariable. Not a hot path: one short-lived process per Bash call; a command holding a substitution is scanned twice, and onerealpathruns per path argument. The corpus of 1122 real commands keeps its 66 expected denies.module_reportblastRadius does not index this bare-Node hook script.Observability
none: the guard is a PreToolUse hook whose only observable output is its deny message on stderr and its exit code, asserted row by row through the real hook entry in
tests/scripts/guard-bash-hook.test.ts; it keeps no degradation ledger or session record, and every new branch is a deny or an allow, not a swallowed failure.Class sweep
Shape: AGENTS.md shape 61 (new), "Stand-in for unknown text stripped per consumer", next to shape 43. Population: every guard-bash consumer of split words, grepped for
splitWords((5 call sites:classifySegment,classifyCheckOrWrite,findPipedCiVerdictStatusReadtwice,cwdAfterSegment) and for every rule word they feed:classifyGit(subcommand, flags, hook-bypass env, paths), argv0 and prefix stripping,classifyNode,classifyMktemp,classifyPkillKillall, thecheckUngatedchain scan, the ci-verdict pipe rule (M = 7, as the verify counted). c0184f1 stripped the mark in 3 of 7. Verdict: fold at the one seam that sees every consumer,findDeny; no consumer reads the mark specially except the path resolver (expandShellWord) and the coproc label check (canFormCoprocIdentifierviaWORD_EXPANSIONS). The three call-site strips andstripSubstitutionMarkare deleted.Path-argument members (every guard-bash rule that takes a path, grepped for
resolve(,isAbsolute(,process.cwd(),realpathSync(,existsSync(,readlinkSync():git worktree remove <path>resolveShellPath, physical, fail closedgit worktree add <path>,git clone <repo> <dir>resolveShellPath, physical, fail opengit -C <dir>gitCwdwalk inclassifyGit, physicalmktemp -dtemplate,-p/--tmpdir=expandShellWordon the template,resolveShellPathon the directorycd/pushd/popdcwdAfterSegment, logicalnode <file>expandShellWord; repository identity stays (#3680)rmtargetspkill -fpatternnode_moduleslink targetConsolidation verdict: one resolver; deleting it would put an expander back into six callers.
Residuals
mktempandnodewords still expand with the command's inline prefix, as on master, soTMPDIR=/tmp mktemp -d $TMPDIR/x.XXXXdenies although bash creates it under the ambient TMPDIR (a false deny, the safe direction), andTMPDIR=/off mktemp -d $TMPDIR/x.XXXXallows with an ambient/tmpTMPDIR (a hygiene false allow). Flipping them needs separate program and word envs insideclassifyMktemp; not folded, because it turns master denies into allows. Not filed (this lane has no issue grant): orchestrator decision.cd -P lnk/..is tracked logically (documented incwdAfterSegment).git $(printf stash)) stays out of scope; it allows on master and here.Round 4 (state space first, written before any edit)
Fourth round on the guard-bash lexer/resolver seam, so this section was posted before the first code edit. Every cell below ran through the real hook entry (
node scripts/hooks/guard-bash.mjs, PreToolUse JSON on stdin) against a fixture:FXis a git repo and the payload cwd andHOME;FX/linkedis a linked worktree whosenode_modulesis a symlink outside it;FX/cleanhas a realnode_modules;FX/scratch/lnk -> ../linked. Columnsmaster(01b525fb5) andc0184f1were measured before the first edit andexpectedwas written then; ther4column is this head, measured after the change (133 of 133 cells give the expected rule).Measured before the table, to set the expectations:
git worktree remove --force scratch/lnk/../linked(fromFX) removedFX/linked: git resolves the raw path physically, so the kernel followslnkbefore...fs.realpathSync("FX/scratch/lnk/../linked")throws ENOENT (it normalizes..lexically first);fs.realpathSync.nativereturnsFX/linked. This is why c0184f1'srealpathSync(path) !== pathguard is inert.cd scratch/lnk/.. && pwdprintsFX/scratch: bash'scdis logical, socdtargets stay lexical.TMPDIR=/home/dev/scratch printf %s "$TMPDIR/foo"prints the shell's TMPDIR, not the inline value: bash expands every word before the command's inline assignments take effect.The rule
A command substitution's output is not known statically. The hook reads each region twice and denies when either reading denies:
lexRegionsleaves). No rule word matches it, and a path that holds it cannot be resolved (worktreeUnresolvedforgit worktree remove).The two other axes follow bash too. A git path word is expanded with the shell's variables (earlier
exportand standalone assignments, then the hook's ambient env), never with the same command's inlineVAR=valprefix; the program's own reads (the hook-bypass env check) see the prefix. A path git hands to the kernel is judged where the kernel puts it: with a..segment, the unnormalized path is resolved physically. Acdtarget stays logical.The verify's remedy (strip the mark in
splitWordsto a zero-widthWORD_EXPANSIONSentry) is the empty reading alone. Measured as mutation M0 (Tests section): it leaves 12 reds, among themgit worktree remove $(echo linked)loses its only positional, andgit -C $(pwd) worktree remove linkedreadsworktreeas-C's value, so both allow; and the expansion table does not survive the prefix slices betweensplitWordsandclassifyGit. The two-reading rule keeps the remedy's deletions (the three call-site strips andstripSubstitutionMark) without those gaps.Findings (review-3997-r2)
HUSKY=0/PI_LENS_SKIP_HOOKS=allowedclassifyGitreads git's env for the bypass check, the shell variables for path words; the sentinel is gone (M3, M4)..cd(M5, M6)stripSubstitutionMarkdeleted; the remedy alone measured as M0$chains through the real hook; the non-bash identifier pre-loop deleted (M7, M8)stripSubstitutionMark,gitInvocationCwddeleted)findDenyimplementsTable
git stash$(printf x) git stashgit`:` stashgit$(:) stash$(:) git stashgi$(:)t stashgit stashgit $(printf x) stashgit stash`:`git stash$(:)git $(:) stashgit st$(:)ashgit commit --no-verify -m xgit commit $(printf x) --no-verify -m xgit commit --no-verify`:` -m xgit commit --no-verify$(:) -m xgit commit $(:) --no-verify -m xgit commit --$(:)no-verify -m xHUSKY=0 git commit -m xHUSKY=0 git $(printf x) commit -m xHUSKY=0 git commit`:` -m xHUSKY=0 git commit$(:) -m xHUSKY=0 git $(:) commit -m xHUSKY=0 git co$(:)mmit -m xPI_LENS_SKIP_HOOKS=1 git commit -m xPI_LENS_SKIP_HOOKS=1 git $(printf x) commit -m xPI_LENS_SKIP_HOOKS=1 git commit`:` -m xPI_LENS_SKIP_HOOKS=1 git commit$(:) -m xPI_LENS_SKIP_HOOKS=1 git $(:) commit -m xPI_LENS_SKIP_HOOKS=1 git co$(:)mmit -m xenv HUSKY=0 git commit -m xexport HUSKY=0; git commit -m xHUSKY=1 git commit -m xgit worktree remove FX/linkedgit worktree remove "$(echo FX/linked)"git worktree remove `echo FX/linked`git worktree remove FX/linked$(:)git worktree remove FX/lin$(:)kedgit worktree remove ~/linkedgit worktree remove "$(echo ~/linked)"git worktree remove `echo ~/linked`git worktree remove ~/linked$(:)git worktree remove ~/lin$(:)kedgit worktree remove $HOME/linkedgit worktree remove "$(echo $HOME/linked)"git worktree remove `echo $HOME/linked`git worktree remove $HOME/linked$(:)git worktree remove $HOME/lin$(:)kedgit worktree remove linkedgit worktree remove "$(echo linked)"git worktree remove `echo linked`git worktree remove linked$(:)git worktree remove lin$(:)kedgit worktree remove scratch/lnk/../linkedgit worktree remove "$(echo scratch/lnk/../linked)"git worktree remove `echo scratch/lnk/../linked`git worktree remove scratch/lnk/../linked$(:)git worktree remove scratch/lnk/../lin$(:)kedHUSKY=0 git worktree remove FX/linkedHUSKY=0 git worktree remove "$(echo FX/linked)"HUSKY=0 git worktree remove `echo FX/linked`HUSKY=0 git worktree remove FX/linked$(:)HUSKY=0 git worktree remove FX/lin$(:)kedHUSKY=0 git worktree remove ~/linkedHUSKY=0 git worktree remove "$(echo ~/linked)"HUSKY=0 git worktree remove `echo ~/linked`HUSKY=0 git worktree remove ~/linked$(:)HUSKY=0 git worktree remove ~/lin$(:)kedHUSKY=0 git worktree remove $HOME/linkedHUSKY=0 git worktree remove "$(echo $HOME/linked)"HUSKY=0 git worktree remove `echo $HOME/linked`HUSKY=0 git worktree remove $HOME/linked$(:)HUSKY=0 git worktree remove $HOME/lin$(:)kedHUSKY=0 git worktree remove linkedHUSKY=0 git worktree remove "$(echo linked)"HUSKY=0 git worktree remove `echo linked`HUSKY=0 git worktree remove linked$(:)HUSKY=0 git worktree remove lin$(:)kedHUSKY=0 git worktree remove scratch/lnk/../linkedHUSKY=0 git worktree remove "$(echo scratch/lnk/../linked)"HUSKY=0 git worktree remove `echo scratch/lnk/../linked`HUSKY=0 git worktree remove scratch/lnk/../linked$(:)HUSKY=0 git worktree remove scratch/lnk/../lin$(:)kedgit $(:) stash$(:) git stashsudo $(:) git stashenv $(:) git stashgit -C . $(:) stashgit `:` stashnpm$(:) run lint; git$(:) commit -m xmktemp $(:)-d /tmp/x.XXXXgit worktree add /tm$(:)p/wtgit clone r /tm$(:)p/xgit stash$(true)git reset --hard$(:)git push --force$(:) origin xgit worktree remove "$(cat f)"git worktree remove $(echo linked)git worktree remove --force "$(echo linked)"git worktree remove -- "$(echo linked)"git worktree remove $(echo -f) linkedgit worktree remove $(true)linkedgit -C $(pwd) worktree remove linkedgit -C "$(pwd)" worktree remove linkedcd $(pwd) && git worktree remove linkedcd $(pwd) && git worktree remove FX/linkedA=$(pwd); git worktree remove $A/linkedgit worktree remove FX/scratch/lnk/../linkedgit worktree remove $PWD/scratch/lnk/../linkedgit -C scratch worktree remove lnk/../linkedcd scratch; git worktree remove lnk/../linkedgit worktree remove scratch/lnk/..cd scratch/lnk/.. && git worktree remove linkedHOME=/x git worktree remove ~/linkedHOME=/x git worktree remove /x/linkedexport HOME=/x; git worktree remove ~/linkedG=~/linked; F=$G; E=$F; D=$E; C=$D; B=$C; A=$B; git worktree remove $AH=~/linked; G=$H; F=$G; E=$F; D=$E; C=$D; B=$C; A=$B; git worktree remove $AI=~/linked; H=$I; G=$H; F=$G; E=$F; D=$E; C=$D; B=$C; A=$B; git worktree remove $AA=B; B=C; C=D; D=E; E=F; F=G; G=H; H=~/linked; git worktree remove $ATMPDIR=/home/dev/scratch git worktree add "$TMPDIR/foo"(ambient TMPDIR=unset)TMPDIR=/home/dev/scratch git worktree add "$TMPDIR/foo"(ambient TMPDIR=/home/dev/elsewhere)coproc C$(:) { git stash; }coproc $(printf C) { git stash; }coproc `printf C`9 { git stash; }git worktree remove cleangit worktree remove FX/cleangit statusecho $(git rev-parse HEAD)git commit -m "$(cat f)"git -C "$(git rev-parse --show-toplevel)" statusgit worktree add "$UNSET_WT"git $(printf stash)rows: 133
master: 52 allow/deny mismatches vs expected
c0184f1: 59 allow/deny mismatches vs expected
r4: 0 allow/deny mismatches vs expected
🤖 Generated with Claude Code