1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-10-31 16:04:37 -07:00
rc/sh/countdiff

6 lines
171 B
Bash

#!/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 "$@"