southwark.log
¶
Python implementation of git log
.
Classes:
|
Python implementation of |
-
class
Log
(repo='.')[source]¶ Bases:
object
Python implementation of
git log
.Attributes:
The name of the current branch
Mapping of local branches to the SHA of the latest commit in that branch.
Mapping of git refs to commit SHAs.
Mapping of remote branches to the SHA of the latest commit in that branch.
The git repository.
Mapping of commit SHAs to tags.
Methods:
format_commit
(commit)Return a human-readable commit log entry.
log
([max_entries, reverse, from_date, ...])Return the formatted commit log.
-
format_commit
(commit)[source]¶ Return a human-readable commit log entry.
- Parameters:
commit (
Commit
) – A Commit object- Return type:
-
local_branches
¶ -
Mapping of local branches to the SHA of the latest commit in that branch.
-
log
(max_entries=None, reverse=False, from_date=None, from_tag=None, colour=True)[source]¶ Return the formatted commit log.
- Parameters:
max_entries (
Optional
[int
]) – Maximum number of entries to display. Default all entries.reverse (
bool
) – Print entries in reverse order. DefaultFalse
.from_date (
Optional
[datetime
]) – Show commits after the given date. DefaultNone
.from_tag (
Optional
[str
]) – Show commits after the given tag. DefaultNone
.
- Return type:
-
remote_branches
¶ -
Mapping of remote branches to the SHA of the latest commit in that branch.
-
repo
¶ Type:
Repo
The git repository.
-
tags
¶ Mapping of commit SHAs to tags.
-