Skip to content

Instantly share code, notes, and snippets.

@headius
Created October 31, 2014 20:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/626627fbb0dc16047959 to your computer and use it in GitHub Desktop.
Save headius/626627fbb0dc16047959 to your computer and use it in GitHub Desktop.
bash function to generate a ruby-core changelog entry from most recent git commit
~/projects/ruby $ changelog
Fri Oct 31 15:56:46 2014 Charles Oliver Nutter <headius@headius.com>
* object.c: Make a meaningless change to test changelog script.
#!/bin/bash
changelog()
{
TZ=jst
git log --pretty=format:"%cd %an <%ae>%n%n%B" --date=local -1 | \
ruby -n -e '$i ||= 0; puts "#{$i>1?"\t":""}#{$_}"; $i+=1'
unset TZ
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment