summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCory Johns <johnsca@gmail.com>2014-03-04 18:33:13 +0000
committerCory Johns <johnsca@gmail.com>2014-03-04 18:33:13 +0000
commitf7ed51ba4c8416888f5744ddb84726316c461051 (patch)
treed1e28fade8e20781b36e296d4d4a3e654a9851b0
parent8005591231c8ae329f0ff320385b190d2ea81df0 (diff)
downloadgitpython-f7ed51ba4c8416888f5744ddb84726316c461051.tar.gz
[#7021] Fixed error serializing programmatically created commits
-rw-r--r--git/objects/commit.py2
1 files changed, 1 insertions, 1 deletions
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