Commits

David Carr committed b3881fd

listkeys: simplify ref stripping expression

Eliminate a find that would always return 0, based on an example in git_handler
update_hg_bookmarks.

  • Participants
  • Parent commits af4d66e

Comments (0)

Files changed (1)

                 newcommits = [bin(c) for c in commits]
                 b = overlayrepo(handler, newcommits, refs)
                 stripped_refs = dict([
-                    (ref[ref.find('refs/heads/')+11:], b.node(refs[ref]))
+                    (ref[11:], b.node(refs[ref]))
                         for ref in refs.keys()
                             if ref.startswith('refs/heads/')])
                 return stripped_refs