Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created December 28, 2016 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitode909/fcfc51d2cdfd3f852d4c3745f1dc8b28 to your computer and use it in GitHub Desktop.
Save hitode909/fcfc51d2cdfd3f852d4c3745f1dc8b28 to your computer and use it in GitHub Desktop.
# git ls-files | ruby theseus.rb | sort | uniq -c
require 'time'
ARGF.each_line.each_with_index {|file, index|
blame = `git blame -c #{file}`.encode('utf-8', invalid: :replace, undef: :replace, replace: '').split(/\n/)
blame.each{|line|
puts Time.parse(line.split(/\t/)[2]).year
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment