Skip to content

Void Rule 6's Ref-Checkout Exemption Where xargs Appends Words in the Write Guard #3388

Closed

Description

@ptr727

Context

Found by the local review of the change that fails closed on a bare git that xargs runs. Develop's guard shares the cases below, and they were read from the code.

Rule 6's Exempt Forms Under xargs Take Appended Force Flags

Rule 6 exempts a git checkout <ref> or git switch <ref> carrying no force flag. Under xargs, the input may append one:

  • echo -f | xargs git checkout main, run in a primary checkout, reads as the exempt ref checkout and is allowed. xargs runs git checkout main -f, which discards local changes.
  • The same holds for git checkout - and git switch <ref>.

Possible Direction

Read a rule-6 exemption as void where xargs runs the git command and may append words, as the push and commit readers already do.

Activity

  1. added
    bug
    pre-existing
    script
    on Oct 23, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpre-existingscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions