|
cp.exec(`git blame --show-email HEAD~1 -- ${file}`, (error, stdout, stderr) => { |
This should be more reliable and require less parsing.
git blame --line-porcelain --follow -w HEAD~1 -- $1 2> /dev/null |\
grep '^author-mail' |\
sed 's/^author-mail <\(.*\)>.*/\1/' |\
sort |\
uniq -c |\
It outputs repeated blocks of text like this:
author Charley Smith
author-mail <charley@smith.com>
author-time 1455249233
author-tz -0700
committer Charley Smith
committer-mail <charley@smith.com>
committer-time 1455311326
committer-tz +0000
summary doc: xxxxxxxx
previous xxxxxxxx README.md
filename README.md
# Quickstart to xxxxxx
xxxxxx 2 2
pythia/modules/process-file.js
Line 26 in 9d5b57b
This should be more reliable and require less parsing.
It outputs repeated blocks of text like this: