Switch ignore dirs to ignore repos

This commit is contained in:
Mustafa Gezen 2023-02-04 01:35:58 +01:00
parent 70aa9d3466
commit 7287bb38eb
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -33,7 +33,7 @@ class Repository:
async def scan_path(
base_path: str,
fmt: str,
ignore_dirs: list[str],
ignore_repos: list[str],
):
"""
Scan base path for repositories
@ -65,8 +65,6 @@ async def scan_path(
# Walk the base path
for directory in os.listdir(root):
if directory in ignore_dirs:
continue
current_parts = parts
if repo_first:
repo_name = directory
@ -118,6 +116,7 @@ async def scan_path(
}
if repo_name not in repos:
repos[repo_name] = []
if repo_name not in ignore_repos:
repos[repo_name].append(repo)
return repos
@ -352,7 +351,7 @@ if __name__ == "__main__":
nargs="+",
action="append",
default=[],
help="Directories in base path to ignore in auto-scan mode",
help="Repos to ignore in auto-scan mode",
)
parser.add_argument(
"-n",