Skip to content

Instantly share code, notes, and snippets.

@gustavopinto
Created October 3, 2019 12:29
Show Gist options
  • Save gustavopinto/80436a7903fd42498c91ae8a34adce22 to your computer and use it in GitHub Desktop.
Save gustavopinto/80436a7903fd42498c91ae8a34adce22 to your computer and use it in GitHub Desktop.
get name and email address of commiters that changed test files
#!/bin/bash
ROOT=`pwd`
for dir in */
do
cd "$dir"
var=$(git log --pretty='%cn,%ae,%s,%H' | grep test | head -n 1)
if [ -n "$var" ]
then
echo $var
fi
cd ..
done
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment