(out: str)
| 433 | |
| 434 | |
| 435 | def _parse_git_iso_date(out: str) -> date | None: |
| 436 | out = (out or "").strip() |
| 437 | if not out: |
| 438 | return None |
| 439 | |
| 440 | try: |
| 441 | return date.fromisoformat(out) |
| 442 | except Exception: |
| 443 | pass |
| 444 | |
| 445 | try: |
| 446 | if out.endswith("Z"): |
| 447 | out = out[:-1] + "+00:00" |
| 448 | return datetime.fromisoformat(out).date() |
| 449 | except Exception: |
| 450 | return None |
| 451 | |
| 452 | |
| 453 | def _git_log_date(repo_root: Path, rel_path: str, extra_args: Sequence[str] = ()) -> date | None: |