(repo: Path, ref: str)
| 946 | |
| 947 | |
| 948 | def _commit_count(repo: Path, ref: str) -> int: |
| 949 | result = _git_stdout(repo, ["rev-list", "--count", ref]).strip() |
| 950 | try: |
| 951 | return int(result) |
| 952 | except ValueError: |
| 953 | return 0 |
| 954 | |
| 955 | |
| 956 | def _require_ref(repo: Path, ref: str) -> None: |
no test coverage detected