3 # Read coverity email on stdin
4 # whenever we find a filename & line number reference, go git-blame it
11 if echo "$line" | grep -q '^/.*: '; then
13 file=$(echo "$line" | cut -d: -f1)
14 elif echo "$line" | grep -q '^[*]'; then
19 elif echo "$line" | grep -q '^[0-9][0-9]*'; then
20 num=$(echo "$line" | awk '{print $1}')
21 [ -z "$start" ] && start=$num
22 #git blame -L "$num,+1" ".$file" | cat
23 elif [ -z "$line" ]; then
24 if [ "$start" -a "$num" -a "$file" ]; then
26 git blame --date=short -L "$start,$end" ".$file" | cat