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 @@ class changelog(baselog): 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 @@ class changelog(baselog): 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 @@ Test some edge cases around a commitless $ 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: