Sync with maint
[gitweb.git] / contrib / remote-helpers / git-remote-hg
index 84e3872d5c5344666b0e4b0241cd609b7359fb2b..34cda027597f30ddacf340466778404f3705361d 100755 (executable)
@@ -644,7 +644,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':