SLOC in git declaration
(for file changes) or
(for sum of changes) as an argument
For example, in bash:
while read sha; do git diff-tree --shortstat $sha $sha^ done
Note that the various diffstat flags can be passed to almost any git command that checks a commit, but they are only documented in the git-diff-tree man page .
source to share