Created
December 22, 2010 19:05
-
-
Save tcrayford/751930 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) | |
files = `find . -name "*.java" -print` | |
results = files.split("\n").map do |filename| | |
`git blame #{filename}` | |
end.map do |blame_result| | |
blame_result.split("\n") | |
end.each do |blame_result_array| | |
blame_result_array.map do |blame_line| | |
blame_line.split("(")[1] | |
end.map do |blame_up_to_paren| | |
blame_up_to_paren.split(" ")[0] | |
end.each do |username| | |
freqs[username] = freqs[username] + 1 | |
end | |
end | |
puts freqs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment