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
git -C /path <subcommand> not rewritten to rtk git #2303
RTK's hook correctly rewrites git <subcommand> → rtk git <subcommand>, but misses the git -C /path <subcommand> form (where -C sets the working directory inline).
This pattern is common in multi-worktree setups and is the recommended style in Claude Code to avoid a permission system bypass (Claude Code bug #59498 — cd /path && git bypasses deny rules entirely, allowing subagents to push/reset without prompting). Users following this best practice end up with all their git commands unhandled by RTK.
Example
# Rewritten correctly:
git status → rtk git status
# Not rewritten (passes through unfiltered):
git -C /Users/paul/MyData/Code/FinancialPlatform status
git -C /Users/paul/MyData/Code/FinancialPlatform/.worktrees/feature/foo log --oneline -10
Request
Treat git -C <path> <subcommand> the same as git <subcommand> in the hook rewriter — strip the -C <path> for routing purposes and pass it through to the underlying rtk git handler.
Volume
rtk discover shows 119 unhandled git -C calls in 30 days for a single project. Since this is the recommended Claude Code pattern, likely affects many users.
RTK hook fails to rewrite git -C <path> <subcommand> form, causing 119+ unhandled calls/month per project; fix requires updating the hook rewriter to recognize the -C flag pattern.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
Triaged automatically by wshm · This is an automated analysis, not a human review.
On v1.2.0 both git -C <path> ... commands from your report are rewritten to rtk git -C ... and run correctly. Support for git -C was added in v0.30.0 (#555), which predates your report, so the change that made the difference for your setup could not be pinned down. Marking it resolved-pending-close: it will be closed in a while unless you still see git -C commands left unrewritten on the latest version. A quoted path that contains spaces is still not rewritten; if that is your case, please say so here.
No new report since the 8 November note, so closing it as described there. Both git -C <path> ... commands from the report are rewritten to rtk git -C ... on v1.2.0 (support came in #555, v0.30.0); a quoted path that contains spaces is still not rewritten. If you still see plain git -C commands go unrewritten on v1.2.0 or later, please comment with the exact command and it can be reopened.
Activity
pszymkowiak commentedon Jun 7, 2026
🔍 Automated Triage
bughighSummary
RTK hook fails to rewrite
git -C <path> <subcommand>form, causing 119+ unhandled calls/month per project; fix requires updating the hook rewriter to recognize the-Cflag pattern.Triaged automatically by wshm · This is an automated analysis, not a human review.
KuSh commentedon Nov 8, 2026
On v1.2.0 both
git -C <path> ...commands from your report are rewritten tortk git -C ...and run correctly. Support forgit -Cwas added in v0.30.0 (#555), which predates your report, so the change that made the difference for your setup could not be pinned down. Marking it resolved-pending-close: it will be closed in a while unless you still seegit -Ccommands left unrewritten on the latest version. A quoted path that contains spaces is still not rewritten; if that is your case, please say so here.KuSh commentedon Nov 15, 2026
No new report since the 8 November note, so closing it as described there. Both
git -C <path> ...commands from the report are rewritten tortk git -C ...on v1.2.0 (support came in #555, v0.30.0); a quoted path that contains spaces is still not rewritten. If you still see plaingit -Ccommands go unrewritten on v1.2.0 or later, please comment with the exact command and it can be reopened.