remote-hg: do not fail on invalid bookmarks
[gitweb.git] / contrib / remote-helpers / git-remote-hg
index c6026b9bed37a91e30a278a02013072d21507061..61562b117c2f023961cdf8e80869dd8b47c8d25f 100755 (executable)
@@ -641,7 +641,10 @@ def do_list(parser):
             print "? refs/heads/branches/%s" % gitref(branch)
 
     for bmark in bmarks:
-        print "? refs/heads/%s" % gitref(bmark)
+        if  bmarks[bmark].hex() == '0000000000000000000000000000000000000000':
+            warn("Ignoring invalid bookmark '%s'", bmark)
+        else:
+            print "? refs/heads/%s" % gitref(bmark)
 
     for tag, node in repo.tagslist():
         if tag == 'tip':