File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 22
33# Report the status of all Git repositories within a directory tree.
44
5- require 'pty'
65require 'main'
76require 'git'
87
@@ -142,10 +141,11 @@ Main {
142141 def run
143142 $params = params
144143 seen = Set . new
145- cmd = "find -H #{ $params[ :dir ] . values * ' ' } -name .git"
144+ dirs = $params[ :dir ] . values * ' '
146145
147- PTY . spawn cmd do |stdin , stdout , pid |
148- stdin . each do |path |
146+ # This command relies on GNU find's -printf directive
147+ IO . popen "find -H -L #{ dirs } -name .git -printf '%p\\ n\\ c'" do |io |
148+ while path = io . gets
149149 next if seen . include? path # never process the same path twice
150150 seen << path
151151
@@ -155,6 +155,7 @@ Main {
155155 GitUpdate . top_ten ( 'FAILED' , path , [ ex . message ] + ex . backtrace ,
156156 false , '#' )
157157 end
158+ STDOUT . flush
158159 end
159160 end
160161 end
You can’t perform that action at this time.
0 commit comments