From 6917ae4ce9eaa0f5ea91592988c1ea830626ac3a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 29 Jun 2010 12:10:56 +0200 Subject: Diff: fixed bug that caused a string to end up as a blob mode --- lib/git/objects/commit.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/git/objects/commit.py') 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 -- cgit v1.2.1