Skip to content

Add coverage for git subcommands: restore, reset, rm, ls-files, rev-parse #445

@mkbctrl

Description

@mkbctrl

Problem

Several common git subcommands are not covered by RTK's compression patterns, causing them to pass through with full uncompressed output. We observed 126 passthrough invocations across these subcommands in a single audit window.

Affected Subcommands

Subcommand Typical Use Frequency
git restore Discard working tree changes ~30
git reset Unstage files, move HEAD ~25
git rm Remove tracked files ~20
git ls-files List tracked/untracked files ~30
git rev-parse Resolve refs to SHAs ~21

Context

These are standard git workflow commands used frequently by AI coding agents. git status, git diff, and git log already have RTK patterns — these five are the next most common and would cover the majority of remaining git passthroughs.

Expected Behavior

Each subcommand should have a compression pattern that strips verbose output while preserving the essential information (file paths, SHAs, status indicators).

Environment

  • RTK v0.27.2
  • git 2.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions