crates/diff/README.md 696 B raw
1
# rustik-diff
2
3
Pure unified-diff parsing and terminal-buffer viewing for Rustik.
4
5
## Git
6
7
Build or install the `rustik-diff` binary, then configure Git to use it for
8
diff-like commands:
9
10
```sh
11
git config --global pager.diff rustik-diff
12
git config --global pager.show rustik-diff
13
```
14
15
Do not set `core.pager` or `pager.log` to `rustik-diff`; `git log` should keep
16
using your normal pager.
17
18
You can also run it directly:
19
20
```sh
21
rustik-diff --cached
22
git diff HEAD~1 | rustik-diff
23
```
24
25
When run without piped input, `rustik-diff` forwards its arguments to
26
`git diff`. When Git runs it as a pager, it reads the patch from standard input
27
and reads interactive keys from the terminal.
28
29
## License
30
31
MIT.