MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / get_default_branch

Function get_default_branch

commitizen/git.py:354–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352
353
354def get_default_branch() -> str:
355 c = cmd.run(["git", "symbolic-ref", "refs/remotes/origin/HEAD"])
356 if c.return_code != 0:
357 raise GitCommandError(c.err)
358 return c.out.strip()

Callers

nothing calls this directly

Calls 1

GitCommandErrorClass · 0.90

Tested by

no test coverage detected