Skip to content

Instantly share code, notes, and snippets.

Created March 21, 2014 11:35
Show Gist options
  • Save anonymous/9684333 to your computer and use it in GitHub Desktop.
Save anonymous/9684333 to your computer and use it in GitHub Desktop.
Dir.chdir ARGV[0]
merged_branches = `git branch -r --merged stable`.split("\n")
unmerged_branches = `git branch -r --no-merged stable`.split("\n")
merged_inc_author = merged_branches.map do |branch|
author = `git log -n1 --pretty='format:%an' #{branch}`
"#{author} merged #{branch}"
end
unmerged_inc_author = unmerged_branches.map do |branch|
author = `git log -n1 --pretty='format:%an' #{branch}`
"#{author} unmerged #{branch}"
end
puts merged_inc_author.concat(unmerged_inc_author).sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment