Created
December 25, 2010 22:04
-
-
Save tcrayford/755075 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
freqs = Hash.new(0) | |
commits = `git log --pretty=oneline --abbrev-commit`.split("\n").map do |line| | |
line.split(" ")[0] | |
end | |
commits.map do |sha| | |
`git show --pretty="format:" --name-only #{sha}` | |
end[1..-1].map do |files| | |
files.split("\n").each do |file| | |
freqs[file] = freqs[file] + 1 | |
end | |
end | |
output = "" | |
freqs.each_pair do |key, value| | |
output = output + "\n" + value.to_s + ": " +key | |
end | |
puts `echo "#{output}" | sort` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment