radare2/sys/locdiff
2022-07-07 13:31:31 +02:00

8 lines
314 B
Bash
Executable File

#!/bin/sh
# alias locdiff='echo $((`git diff |grep ^+ | wc -l`-`git diff |grep ^- | wc -l`))'
#A=`hg diff $@ | grep -v '+++' | grep ^+ |wc -l`
#B=`hg diff $@ | grep -v -- '---' | grep ^- |wc -l`
A="$(git diff "$@" | grep -v '+++' | grep -c ^+)"
B="$(git diff "$@" | grep -v -- '---' | grep -c ^-)"
echo "$((A-B))"