diff options
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index db1493d5..b2ed02c0 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -35,7 +35,9 @@ import sys __all__ = ('Commit', ) + class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): + """Wraps a git Commit object. This class will act lazily on some of its attributes and will query the @@ -52,7 +54,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): # INVARIANTS default_encoding = "UTF-8" - # object configuration type = "commit" __slots__ = ("tree", @@ -158,7 +159,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): else: return len(self.repo.git.rev_list(self.hexsha, **kwargs).splitlines()) - @property def name_rev(self): """ @@ -257,7 +257,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): if hasattr(proc_or_stream, 'wait'): finalize_process(proc_or_stream) - @classmethod def create_from_tree(cls, repo, tree, message, parent_commits=None, head=False): """Commit the given tree, creating a commit object. @@ -329,7 +328,6 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): enc_section, enc_option = cls.conf_encoding.split('.') conf_encoding = cr.get_value(enc_section, enc_option, cls.default_encoding) - # if the tree is no object, make sure we create one - otherwise # the created commit object is invalid if isinstance(tree, str): |