You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resolve a Leading ~+ Directory Rather Than Failing Closed in the Write Guard #3318
Rule 6 of the write guard, the primary-checkout mutation check, now fails closed on a directory the shell reads from its directory stack. The pull request closing #3048 added this for cd - and ~-, which name the previous directory the hook cannot see. The same pattern also matches ~+ and ~+/sub. Those are $PWD, the shell's current directory at that point in the command.
At the start of a command, the hook already knows that directory. So cd ~+/sub && git commit -m x is denied though the guard could resolve it. Where an earlier cd in the same command moved the shell, ~+ follows it, and the hook does not track that. So reading ~+ as the session directory would be wrong there.
This is an over-denial of low likelihood, found by the local review on that pull request. Per that lane's rule, it is filed rather than narrowed in the same pull request.
Reproduction (constructed paths)
Classify cd ~+/sub && git commit -m x with a session directory that is a linked worktree. The guard denies it, naming the directory stack.
Possible Direction
Read a leading ~+ as the session's own directory where no cd precedes it in the command, and keep failing closed otherwise.
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.
Activity
Judge a Push Against the Repository and Branches It Actually Writes (#…
ptr727 commentedon Oct 23, 2026
Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.