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

Function get_commits

commitizen/git.py:207–221  ·  view source on GitHub ↗

Get the commits between start and end.

(
    start: str | None = None,
    end: str | None = None,
    *,
    args: Sequence[str] = (),
)

Source from the content-addressed store, hash-verified

205
206
207def get_commits(
208 start: str | None = None,
209 end: str | None = None,
210 *,
211 args: Sequence[str] = (),
212) -> list[GitCommit]:
213 """Get the commits between start and end."""
214 if end is None:
215 end = "HEAD"
216 git_log_entries = _get_log_as_str_list(start, end, args)
217 return [
218 GitCommit.from_rev_and_commit(rev_and_commit)
219 for rev_and_commit in git_log_entries
220 if rev_and_commit
221 ]
222
223
224def get_filenames_in_commit(git_reference: str = "") -> list[str]:

Callers

nothing calls this directly

Calls 2

_get_log_as_str_listFunction · 0.85
from_rev_and_commitMethod · 0.80

Tested by

no test coverage detected