Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shashidharatd/7e2681e22fab293391496385504121fd to your computer and use it in GitHub Desktop.
Save shashidharatd/7e2681e22fab293391496385504121fd to your computer and use it in GitHub Desktop.
brainless
#!/bin/bash
function print_repo_commits()
{
repo=$1
cd $repo
git log --author=shashidharatd --oneline --branches=master --after=2017-01-01 --before=2017-12-31 --shortstat |sed 's/^ /, /'| sed ':begin;$!N;s/\n//;tbegin' |sed 's/)\?\([0-9a-f]\{7\}\) /)\n\1,/g' |sed 's/, [0-9]\+ files\? changed//;s/insertions\?(+)//;s/, [0-9]\+ deletions\?(-)//' >/tmp/cc_$repo.txt
cd -
}
file_list=$1
while read line
do
print_repo_commits $line
echo $line
done<${file_list}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment