mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
40e7eadbaf
Problem: - `rtk git add -A` failed with "unexpected argument '-A' found" - Git flags like -A, -p, --all were rejected by Clap parser - Only filenames could be passed to `git add` Solution: - Add `allow_hyphen_values = true` to Add command args (following PR #5 pattern) - Change Add enum variant from `Add { files }` to `Add` (unified with other git commands) - Modify run_add() to accept args slice and pass all arguments to git - Add exit code propagation for consistency with other git commands Impact: - All native git add flags now work: -A, -p, --all, --update, etc. - Maintains RTK compact output format ("ok ✓ 2 files changed, ...") - Preserves backward compatibility (no args defaults to ".") Testing: - Manual: `rtk git add -A` works correctly - All existing tests pass (154 passed) - Smoke tests unchanged (git add not included in test-all.sh) Fixes: Argument parsing error for git add with native flags Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>