mirror of
https://github.com/notwa/rc
synced 2024-05-20 10:53:23 -07:00
add countdiff util for counting lines that differ
This commit is contained in:
parent
b89ac3c39d
commit
dd72962588
6
sh/countdiff
Normal file
6
sh/countdiff
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env sh
|
||||
countdiff() {
|
||||
git --no-pager diff --stat --no-color --no-index "$1" "$2" \
|
||||
| awk '/changed/{print $4+$6;a=1}END{if(!a)print 0}'
|
||||
}
|
||||
countdiff "$@"
|
Loading…
Reference in New Issue
Block a user