(repo_dir: Path)
| 1387 | return (result.stdout or "").strip() |
| 1388 | |
| 1389 | |
| 1390 | def _git_ahead_behind(repo_dir: Path, branch: str) -> Tuple[int, int]: |
| 1391 | try: |
| 1392 | output = _git_output(["rev-list", "--left-right", "--count", f"HEAD...origin/{branch}"], repo_dir) |
| 1393 | ahead_text, behind_text = output.split() |
| 1394 | return int(ahead_text), int(behind_text) |
| 1395 | except Exception: |
| 1396 | return 0, 0 |
| 1397 | |
| 1398 | |
| 1399 | def _ensure_notes_gitignore(repo_dir: Path) -> None: |
| 1400 | ignore_path = repo_dir / ".gitignore" |
| 1401 | existing = ignore_path.read_text(encoding="utf-8").splitlines() if ignore_path.exists() else [] |
no outgoing calls
no test coverage detected