dump-things-service/dump_things_service/commands/gitaudit_rebuild_index.py
Michael Hanke c332abbd1b
Some checks failed
Codespell / Check for spelling errors (push) Successful in 42s
Codespell / Check for spelling errors (pull_request) Successful in 43s
Ruff / Code linting (push) Failing after 52s
Ruff / Code linting (pull_request) Failing after 54s
Test execution / Test-all (push) Successful in 1m27s
Type annotation (PR) / check (pull_request) Failing after 1m30s
chore: auto-apply code formatting fixes via hatch check fmt --fix
2026-06-30 20:41:05 +02:00

27 lines
654 B
Python

from __future__ import annotations
import sys
from argparse import ArgumentParser
from pathlib import Path
from dump_things_service.audit.gitaudit import GitAuditBackend
parser = ArgumentParser(
prog='Rebuild the index of a `gitaudit`-database',
description='This command rebuilds the index of a `gitaudit`-database.',
)
parser.add_argument(
'audit_store', help='The directory in which the `gitaudit`-database is located.'
)
def main():
arguments = parser.parse_args()
audit_backend = GitAuditBackend(Path(arguments.audit_store))
audit_backend._rebuild_index()
return 0
if __name__ == '__main__':
sys.exit(main())