Skip to content

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

Closed

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

Activity

  1. added
    enhancement
    on Mar 12, 2026
  2. pszymkowiak commented on Mar 16, 2026

    @pszymkowiak
    Collaborator

    Fixed in v0.30.0 — git subcommands (restore, reset, rm, ls-files, rev-parse) all work via passthrough. Tested locally: rtk git restore --staged, rtk git rm --dry-run, rtk git ls-files, rtk git rev-parse HEAD all return correct output with exit code 0.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions