diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-14 17:24:15 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-14 17:24:15 +0200 |
commit | 6eeae8b24135b4de05f6d725b009c287577f053d (patch) | |
tree | 017dd833346aa96c4cb4177a4352e3de5ff176bc /lib/git/objects/commit.py | |
parent | ead94f267065bb55303f79a0a6df477810b3c68d (diff) | |
download | gitpython-6eeae8b24135b4de05f6d725b009c287577f053d.tar.gz |
test: Added time-consuming test which could also be a benchmark in fact - currently it cause hundreds of command invocations which is slow
Fixed issue with trees not properly initialized with their default mode
_set_cache_: some objects checked whether the attribute was within their __slots__ although it should have been accessed through its class
Diffstat (limited to 'lib/git/objects/commit.py')
-rw-r--r-- | lib/git/objects/commit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git/objects/commit.py b/lib/git/objects/commit.py index 340686ea..69fb3710 100644 --- a/lib/git/objects/commit.py +++ b/lib/git/objects/commit.py @@ -71,7 +71,7 @@ class Commit(base.Object, Iterable): # END for each parent to convert if self.id and tree is not None: - self.tree = Tree(repo, id=tree) + self.tree = Tree(repo, id=tree, path='') # END id to tree conversion def _set_cache_(self, attr): @@ -80,7 +80,7 @@ class Commit(base.Object, Iterable): to be set. We set all values at once. """ - if attr in self.__slots__: + if attr in Commit.__slots__: temp = Commit.list_items(self.repo, self.id, max_count=1)[0] self.parents = temp.parents self.tree = temp.tree |