Skip to content
Snippets Groups Projects
Commit b3881fda authored by David M. Carr's avatar David M. Carr
Browse files

listkeys: simplify ref stripping expression

Eliminate a find that would always return 0, based on an example in git_handler
update_hg_bookmarks.
parent af4d66e2
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment