[Request] [+ ] D8541: git: avoid looking-up parents for the null commit
rom1dep (Romain DEP.)
phabricator at mercurial-scm.org
Sun May 17 17:41:45 UTC 2020
rom1dep created this revision.
Herald added a reviewer: durin42.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8541
AFFECTED FILES
hgext/git/gitlog.py
CHANGE DETAILS
diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py
--- a/hgext/git/gitlog.py
+++ b/hgext/git/gitlog.py
@@ -324,7 +324,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)
To: rom1dep, durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200517/771950dc/attachment.html>
More information about the Mercurial-patches
mailing list