Method: Brigit.at_repos
- Defined in:
- lib/brigit.rb
.at_repos(submodules = false, base = Dir.pwd) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/brigit.rb', line 42 def self.at_repos(submodules = false, base = Dir.pwd) Find.find(base) do |path| if File.basename(path) == '.git' && File.directory?(path) Find.prune elsif File.directory?(File.join(path, '.git')) Dir.chdir path do yield path end Find.prune unless submodules end end end |