Skip to content

Instantly share code, notes, and snippets.

@mehlah
Created August 8, 2014 17:39
Show Gist options
  • Save mehlah/c923707e37018e06e595 to your computer and use it in GitHub Desktop.
Save mehlah/c923707e37018e06e595 to your computer and use it in GitHub Desktop.
require 'git'
g = Git.open('.')
commits = g.log.reject do |commit|
commit.message.start_with?('Merge')
end
words = 0
commits.each { |commit| words += commit.message.split(' ').count }
puts words.to_f / commits.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment