Created
October 24, 2011 09:07
-
-
Save vrinek/1308633 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
ruby ../cleanup_gist/merged_branches.rb > ../cleanup_gist/table.txt && cat ../cleanup_gist/table.txt |
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
require 'rubygems' | |
require 'hirb' | |
cmd = "git branch --color=never -a --merged | grep --color=never origin/ | xargs -n1 git log -1 --decorate --pretty=format:'%d|%aN|%ar|%s%n' |sort -t'|' --key=2,2" | |
br = `#{cmd}`.split("\n").reject{|b| b =~ /HEAD/} | |
br = br.sort.map{|b| b.strip.split "|"} | |
puts Hirb::Helpers::Table.render br, :max_width => 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment