Skip to content

Instantly share code, notes, and snippets.

@pirapira
Created December 21, 2011 17:58
Show Gist options
  • Save pirapira/1506987 to your computer and use it in GitHub Desktop.
Save pirapira/1506987 to your computer and use it in GitHub Desktop.
gather commit
UNSORTED = "/Users/yh/unsorted.txt"
require "shell"
require "find"
def emit(path)
s = Shell.new
s.cd path
s.system('/usr/local/bin/git log --all --format="format:%at %H %an" >> ' + UNSORTED)
s.system('echo >> ' + UNSORTED)
end
system('rm ' + UNSORTED)
Find.find '/Users/yh' do |f|
next if f.match /src/
if f.match /\.git\Z/
emit f
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment