Public
Snippet $1655164 authored by Pawel Rein

shortlist

#!/usr/bin/env ruby

counts = Hash.new 0

git_out=`git log --format=%aN`

git_out.split(/\n/).each do |name|
  counts[name] += 1
end

# Sorting by count in reverse order and then by name
sorted = counts.sort_by { |k,v| [-v, k] }

sorted.each do |name, count|
  puts "#{count} #{name}"
end