From f7ed51ba4c8416888f5744ddb84726316c461051 Mon Sep 17 00:00:00 2001 From: Cory Johns Date: Tue, 4 Mar 2014 18:33:13 +0000 Subject: [#7021] Fixed error serializing programmatically created commits --- git/objects/commit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/objects/commit.py') diff --git a/git/objects/commit.py b/git/objects/commit.py index 035ce004..edbdf038 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -121,7 +121,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): self.parents = parents if encoding is not None: self.encoding = encoding - if gpgsig is not None: + if binsha == '\x00'*20 or gpgsig is not None: self.gpgsig = gpgsig @classmethod -- cgit v1.2.1