1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 07:19:02 -08: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 "$@"