Skip to content

Instantly share code, notes, and snippets.

@dekart
Created March 24, 2009 11:55
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 dekart/84051 to your computer and use it in GitHub Desktop.
Save dekart/84051 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
Dir["*"].each do |f|
if File.directory?(f) and File.directory?(File.join(f, ".git"))
command = "cd #{f}; git #{ARGV.collect{|a| a.include?(" ") ? "\"#{a}\"" : a }.join(" ")}"
puts "Command: #{command}"
result = `#{command}`
unless result =~ /nothing to commit/
puts File.basename(f)
puts "-"*10
puts "\n"
puts result
puts "\n\n"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment