Created
August 10, 2015 18:58
-
-
Save AVGP/35319edfaa9a3306073f to your computer and use it in GitHub Desktop.
Small bash function that outputs the number of lines added and removed in a commit
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
DEFAULT="[37;40m" | |
RED="[31;40m" | |
GREEN="[32;40m" | |
hg_changes() { | |
echo -e "\e${RED}`hg log -pr $1 | grep '^+' | wc -l` Additions\e${DEFAULT}"; echo -e "\e${GREEN}`hg log -pr $1 | grep '^-' | wc -l` Deletions\e${DEFAULT}"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment