# HG changeset patch # User Romain DEP. # Date 1589226971 -7200 # Node ID 8bfc6cc8e48003d2411551f2042d6cdeb0f12374 # Parent 288328c6711bba021eafc225ead2fd52a9b310eb git: avoid looking-up parents for the null commit Differential Revision: https://phab.mercurial-scm.org/D8541 diff -r 288328c6711b -r 8bfc6cc8e480 hgext/git/gitlog.py --- a/hgext/git/gitlog.py Mon May 11 21:56:43 2020 +0200 +++ b/hgext/git/gitlog.py Mon May 11 21:56:11 2020 +0200 @@ -270,7 +270,10 @@ def parentrevs(self, rev): n = self.node(rev) hn = gitutil.togitnode(n) - c = self.gitrepo[hn] + if hn != gitutil.nullgit: + c = self.gitrepo[hn] + else: + return nodemod.nullrev, nodemod.nullrev p1 = p2 = nodemod.nullrev if c.parents: p1 = self.rev(c.parents[0].id.raw)