summaryrefslogtreecommitdiff
path: root/lib/git/objects/commit.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-29 12:10:56 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-29 12:10:56 +0200
commit6917ae4ce9eaa0f5ea91592988c1ea830626ac3a (patch)
tree75f0f55477a70f52eeb72512116ca143cea2f4ec /lib/git/objects/commit.py
parentf1401803ccf7db5d897a5ef4b27e2176627c430e (diff)
downloadgitpython-6917ae4ce9eaa0f5ea91592988c1ea830626ac3a.tar.gz
Diff: fixed bug that caused a string to end up as a blob mode
Diffstat (limited to 'lib/git/objects/commit.py')
-rw-r--r--lib/git/objects/commit.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/git/objects/commit.py b/lib/git/objects/commit.py
index f365c994..f88bb0e8 100644
--- a/lib/git/objects/commit.py
+++ b/lib/git/objects/commit.py
@@ -105,6 +105,8 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
as what time.altzone returns. The sign is inverted compared to git's
UTC timezone."""
super(Commit,self).__init__(repo, binsha)
+ if tree is not None:
+ assert isinstance(tree, Tree), "Tree needs to be a Tree instance, was %s" % type(tree)
self._set_self_from_args_(locals())
@classmethod