Skip to content

Instantly share code, notes, and snippets.

@chrismdp
Created June 26, 2011 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismdp/1048010 to your computer and use it in GitHub Desktop.
Save chrismdp/1048010 to your computer and use it in GitHub Desktop.
Committer stats
committers = `git log --pretty=format:%an`
authors = []
committers.each_line do |commit|
commit.chomp.split(' and ').map{|a| authors.push a}
end
stats = Hash.new(0)
authors.map do |author|
stats[author] += 1
end
stats.sort{|a,b| b[1]<=>a[1]}.each { |elem|
puts "#{elem[0]} (#{elem[1]})"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment