Skip to content

Commit cbc6535

Browse files
committed
filter-repo: pass raw bytestring to regex compilation
Signed-off-by: Elijah Newren <[email protected]>
1 parent b164ffc commit cbc6535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-filter-repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ class FastExportParser(object):
941941
# Compile some regexes and cache those
942942
self._mark_re = re.compile(br'mark :(\d+)\n$')
943943
self._parent_regexes = {}
944-
parent_regex_rules = (b' :(\d+)\n$', b' ([0-9a-f]{40})\n')
944+
parent_regex_rules = (br' :(\d+)\n$', br' ([0-9a-f]{40})\n')
945945
for parent_refname in (b'from', b'merge'):
946946
ans = [re.compile(parent_refname+x) for x in parent_regex_rules]
947947
self._parent_regexes[parent_refname] = ans

0 commit comments

Comments
 (0)