diff options
| author | Simeon Simeonov | 2018-09-18 15:25:02 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2018-09-18 15:25:02 +0200 |
| commit | 15f1a9fe61626c2a8c8682300c620572d7c08a61 (patch) | |
| tree | 31cc4aa9bafafd6395d420de3fa24a3fc6d1fe21 | |
| parent | 22fb4125b4904f266467d48e88d5e5951ebd6eec (diff) | |
Optimize fetch_git_repos
| -rwxr-xr-x | pygitchecker.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pygitchecker.py b/pygitchecker.py index 200627e..719cac3 100755 --- a/pygitchecker.py +++ b/pygitchecker.py | |||
| @@ -71,6 +71,8 @@ def fetch_git_repos(abspath): | |||
| 71 | """ | 71 | """ |
| 72 | repo_list = list() | 72 | repo_list = list() |
| 73 | for root, dirs, files in os.walk(abspath): | 73 | for root, dirs, files in os.walk(abspath): |
| 74 | if '/.git' in root: | ||
| 75 | continue | ||
| 74 | if '.git' in dirs: | 76 | if '.git' in dirs: |
| 75 | try: | 77 | try: |
| 76 | pygit2.Repository(root) | 78 | pygit2.Repository(root) |
