Created
March 22, 2019 04:03
-
-
Save RohanM/f3f44f3d0b6760a61841dba2638fddc8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
set -e | |
START_COMMIT=abcdef123 | |
COMMITS=$(git log --format="%H %ad" --merges $START_COMMIT...) | |
while read -r LINE; do | |
COMMIT=$(echo $LINE |cut -d ' ' -f 1) | |
DATE=$(echo $LINE |cut -d ' ' -f 2-) | |
`git checkout -q $COMMIT` | |
BACKBONE_MENTIONS=$(git grep -ci 'backbone' |wc -l) | |
REACT_MENTIONS=$(git grep -cE 'React|react' |wc -l) | |
echo "$COMMIT,$DATE,$BACKBONE_MENTIONS,$REACT_MENTIONS" | |
done <<< "$COMMITS" | |
`git checkout -q master` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment