File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,15 @@ def searchRepositories():
8282 html .path = curdir
8383 startinglevel = curdir .count (os .sep )
8484
85- for directory , dirnames , filenames in os .walk (curdir ):
85+ for directory , dirnames , filenames in os .walk (curdir , topdown = True ):
8686 level = directory .count (os .sep ) - startinglevel
87- if argopts .get ('depth' , None ) is None or level <= argopts .get ('depth' , None ):
88- if '.git' in dirnames :
89- showDebug (" Add %s repository" % directory )
90- repo .add (directory )
87+
88+ if '.git' in dirnames :
89+ showDebug (" Add %s repository" % directory )
90+ repo .add (directory )
91+
92+ if argopts .get ('depth' , None ) is not None and level >= argopts .get ('depth' , None ):
93+ dirnames [:] = []
9194
9295 showDebug ('Done' )
9396 return sorted (repo )
You can’t perform that action at this time.
0 commit comments