chiark / gitweb /
Make sure patches with no parents have an empty list of parents
authorKarl Hasselström <kha@treskal.com>
Thu, 20 Mar 2008 23:12:10 +0000 (23:12 +0000)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 20 Mar 2008 23:12:10 +0000 (23:12 +0000)
They used to have None instead of an empty list, which was
inconsistent. (It went undetected for quite a while because StGit
seldom needs to handle initial commits.)

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/lib/git.py

index 50dc4f112408e35d9f384a4cf188129d84e18496..cdfe885c25dc10cb374812e4da9e5e87f4f558d8 100644 (file)
@@ -204,7 +204,7 @@ class Commitdata(Repr):
                 ) % (tree, parents, self.author, self.committer, self.message)
     @classmethod
     def parse(cls, repository, s):
-        cd = cls()
+        cd = cls(parents = [])
         lines = list(s.splitlines(True))
         for i in xrange(len(lines)):
             line = lines[i].strip()