Skip to content

Commit 30b21be

Browse files
fieldingclaude
andcommitted
Document unknown flag passthrough and --stat in README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a1877c commit 30b21be

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ nit log -H # includes dates, colored hashes
7575
nit diff -H # 3-line context, stat summary, colored output
7676

7777
nit log -n 5 # limit to 5 commits
78+
nit show --stat # compact file change summary
7879
```
7980

8081
### Passthrough
@@ -87,9 +88,19 @@ nit push # -> git push
8788
nit checkout -b foo # -> git checkout -b foo
8889
```
8990

91+
Passthrough also kicks in for **unrecognized flags** on native commands. If you pass a flag nit doesn't handle, it delegates to git rather than silently ignoring it:
92+
93+
```sh
94+
nit diff --name-only # nit doesn't implement --name-only, passes to git
95+
nit log --graph # nit doesn't implement --graph, passes to git
96+
nit show --format=... # nit doesn't implement --format, passes to git
97+
```
98+
99+
This makes `alias git=nit` safe. You never lose functionality - you just get optimized output for the flags nit knows about, and standard git behavior for everything else.
100+
90101
Passthrough uses `execvpe` - it replaces the nit process with git directly. No subprocess, no wrapper overhead. It's as if you typed `git` yourself.
91102

92-
This means you can `alias git=nit` and everything just works. As commands get optimized with native libgit2 implementations (prioritized by real-world usage frequency), the passthrough shrinks and nit gets faster - no config changes needed.
103+
As commands and flags get optimized with native libgit2 implementations (prioritized by real-world usage frequency), the passthrough shrinks and nit gets faster - no config changes needed.
93104

94105
## Compact vs Human
95106

0 commit comments

Comments
 (0)