MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / _commit_count

Function _commit_count

src/deepscientist/gitops/diff.py:948–953  ·  view source on GitHub ↗
(repo: Path, ref: str)

Source from the content-addressed store, hash-verified

946
947
948def _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
956def _require_ref(repo: Path, ref: str) -> None:

Callers 1

list_branch_canvasFunction · 0.85

Calls 2

_git_stdoutFunction · 0.85
intFunction · 0.50

Tested by

no test coverage detected