forked from alikins/gitconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-burners
More file actions
executable file
·38 lines (31 loc) · 904 Bytes
/
Copy pathgit-burners
File metadata and controls
executable file
·38 lines (31 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#
# show who has the most lines of codes to their name
#
status=
exclude=
while [ "$1" != "" ]; do
case $1 in
-x | --exclude ) shift
exclude=$1
;;
esac
shift
done
grep_opts="."
if [ -n "$exclude" ] ; then
grep_opts="-v $exclude"
fi
#git ls-files -z | grep $grep_opts | xargs -0 -n 1 | while read line;
git ls-files | grep $grep_opts | while read line;
do
# git annotate -b -- "${line}";
git blame -C -w -- "${line}";
# regex from http://gitorious.org/joenio/misc/blobs/master/git-blame-stats
done | perl -pe "s[^.*?\((.*?)\s*\d{4}-\d{2}-\d{2}.*][\1]" | sort | uniq -c | sort -n
#IFS=''
#git ls-files | grep $grep_opts | while read line;
#do
# git blame -f -e -- "\"${line}\"";
#done | awk '{print $3 }' | sort |perl -pe "s/\(\<(.+\@.+)\>+/\1/; " | uniq -c | sort -n
#unset IFS