Skip to content

Instantly share code, notes, and snippets.

@dsturnbull
Created May 14, 2009 05:56
Show Gist options
  • Save dsturnbull/111511 to your computer and use it in GitHub Desktop.
Save dsturnbull/111511 to your computer and use it in GitHub Desktop.
potential_tag = ARGV[0]
if potential_tag =~ /^refs\/tags\/(.*)$/
tag = $1
tag_data = `git describe --tags #{tag}^`.strip
tag_data =~ /(.*?)-([0-9]+)-([0-9a-g]{8,8})$/
old_tag = $1
commit_count = $2
g_plus_hash = $3
log = `git log --pretty=format:"<%s> by %an, committed by %cn on %ci (%h)" #{tag}~#{commit_count}^..#{tag}`
IO.popen('sendmail -f [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]', 'w') do |io|
io << "Subject: hi\n"
io << "From: git\n"
io << "To: you\n"
io << "\n"
io << log
io << "\n"
io << "\n"
io << "-- \n"
io << "git describe --tags #{tag}^\n"
io << "git log #{tag}~#{commit_count}^..#{tag}\n"
io << "\n"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment