Skip to content

Instantly share code, notes, and snippets.

@mrc
Created May 13, 2011 02:51
Show Gist options
  • Save mrc/969887 to your computer and use it in GitHub Desktop.
Save mrc/969887 to your computer and use it in GitHub Desktop.
git histogram of commits over hours
# http://twitter.com/#!/mfeathers/status/61229026034978817
`git log | grep "^Date"`.split($/).map { |line| line.split(' ')[4].split(':')[0] }.group_by { |x| x }.map {|k,v| [k,v.length] }
@newacct
Copy link

newacct commented Aug 25, 2011

.sort.group_by { |x| x } should just be written as .group_by { |x| x }. sort is unnecessary

@mrc
Copy link
Author

mrc commented Aug 25, 2011

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment