Created
September 10, 2020 22:52
-
-
Save icgood/19bbed589ead78515fb1c95ba558d9d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Install to $PATH | |
# Usage: git diff-stats | |
output=$(git diff $@) | |
echo + $(grep -e '^\+[^\+]' -e '^\+$' <<<"""$output""" | wc -l) | |
echo - $(grep -e '^\-[^\-]' -e '^\-$' <<<"""$output""" | wc -l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment