Skip to content

bug: rtk git -C <path> ... is rejected (works only via separator form) #163

@pavelbe

Description

@pavelbe

Summary

rtk git -C <path> ... is rejected by CLI parser, while native git -C <path> ... works.

Currently only separator form works:

  • rtk git -- -C <path> status --short --branch
  • rtk git -C <path> status --short --branch

Environment

  • RTK: rtk 0.20.0
  • OS: Linux (WSL2 Ubuntu)
  • git: 2.43.0

Reproduction

git -C /home/pavelbe/Projects/rtk-lab status --short --branch
# exit 0

rtk git -C /home/pavelbe/Projects/rtk-lab status --short --branch
# exit 2
# error: unexpected argument -C found

rtk git -- -C /home/pavelbe/Projects/rtk-lab status --short --branch
# exit 0

Actual

rtk git -C ... fails with:

error: unexpected argument -C found

Usage: rtk git [OPTIONS] <COMMAND>

Expected

Either of these options would solve parity expectations:

  1. Support -C in direct rtk git -C ... form (preferred parity with git), or
  2. Explicitly document and normalize this at rewrite layer, but still ideally keep native CLI parity.

Why this matters

Hook/rewrite tooling frequently generates git -C ... patterns for repo-scoped operations. Lack of direct support forces proxy fallback and reduces native RTK coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions