diff --git a/hgext/git/gitlog.py b/hgext/git/gitlog.py --- a/hgext/git/gitlog.py +++ b/hgext/git/gitlog.py @@ -221,9 +221,10 @@ n = self.node(nodeorrev) else: n = nodeorrev + extra = {b'branch': b'default'} # handle looking up nullid if n == nullid: - return hgchangelog._changelogrevision(extra={}, manifest=nullid) + return hgchangelog._changelogrevision(extra=extra, manifest=nullid) hn = gitutil.togitnode(n) # We've got a real commit! files = [ @@ -253,7 +254,7 @@ filesremoved=filesremoved, description=c.message.encode('utf8'), # TODO do we want to handle extra? how? - extra={b'branch': b'default'}, + extra=extra, ) def ancestors(self, revs, stoprev=0, inclusive=False): diff --git a/tests/test-git-interop.t b/tests/test-git-interop.t --- a/tests/test-git-interop.t +++ b/tests/test-git-interop.t @@ -57,6 +57,12 @@ $ hg init --git $ hg heads [1] + $ hg tip + changeset: -1:000000000000 + tag: tip + user: + date: Thu Jan 01 00:00:00 1970 +0000 + $ cd .. Make a new repo with git: