Created
June 3, 2013 14:32
-
-
Save gnurag/5698577 to your computer and use it in GitHub Desktop.
This file contains 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 | |
tag1 = ARGV[0] | |
tag2 = ARGV[1] | |
cmd=`git log #{tag1}..#{tag2} --pretty='format:%ci::%an <%ae>::%s'` | |
list = {} | |
list_order = [] | |
cmd.split("\n").each do |l| | |
date, author, subject = l.chomp.split("::") | |
date, time, zone = date.split(" ") | |
id = "#{date}\t#{author}" | |
if not list[id] | |
list[id] = [] | |
list_order << {:id => id, :value => list[id]} | |
end | |
list[id] << subject | |
end | |
# list.each do |id, value| | |
list_order.each do |i| | |
id = i[:id] | |
value = i[:value] | |
puts "* #{id}" | |
puts value.map { |e| "- #{e}" }.join("\n") | |
puts "\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment