(repo_root: Path, rel_path: str, extra_args: Sequence[str] = ())
| 451 | |
| 452 | |
| 453 | def _git_log_date(repo_root: Path, rel_path: str, extra_args: Sequence[str] = ()) -> date | None: |
| 454 | args = [ |
| 455 | "log", |
| 456 | "-1", |
| 457 | "--date=short", |
| 458 | "--format=%cd", |
| 459 | *extra_args, |
| 460 | "--", |
| 461 | rel_path, |
| 462 | ] |
| 463 | code, out, _err = _run_git(args, cwd=repo_root) |
| 464 | if code != 0: |
| 465 | return None |
| 466 | return _parse_git_iso_date(out) |
| 467 | |
| 468 | |
| 469 | def git_last_touched(repo_root: Path, rel_path: str) -> date | None: |
no test coverage detected