Skip to content

Instantly share code, notes, and snippets.

@onishi
Created June 22, 2010 03:16
Show Gist options
  • Save onishi/447886 to your computer and use it in GitHub Desktop.
Save onishi/447886 to your computer and use it in GitHub Desktop.
check your responsibility
#!/bin/sh
if [ $# -eq 2 ]
then
i=$2
else
i=`whoami`
fi
declare -i mine=`git blame $1 | grep -i $i | wc -l`
declare -i total=`cat $1 | wc -l`
declare -i rate=$mine*100/$total
echo $rate'%'
@onishi
Copy link
Author

onishi commented Jun 22, 2010

blamerate /path/to/file author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment