Created
September 9, 2021 07:44
-
-
Save TheLonelyGhost/2dc50fe6eaa0679fdd581e056e20741b to your computer and use it in GitHub Desktop.
determine how many lines added and removed from a given commit-ish (ref, brach, whatever)
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
#!/usr/bin/env bash | |
set -euo pipefail | |
git diff --numstat "$@" | awk '{ sum_plus+=$1; sum_minus+=$2 } END { print("+++++ ", sum_plus); print("----- ", sum_minus); }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment