MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _ensure_notes_gitignore

Function _ensure_notes_gitignore

deployments/desktop/shared/agents.py:1389–1398  ·  view source on GitHub ↗
(repo_dir: Path)

Source from the content-addressed store, hash-verified

1387 return (result.stdout or "").strip()
1388
1389
1390def _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
1399def _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 []

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected