From cbc6535694380d3a3bf3e5c96410d4ce7e8de94f Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 8 Oct 2022 21:42:32 -0700 Subject: [PATCH] filter-repo: pass raw bytestring to regex compilation Signed-off-by: Elijah Newren --- git-filter-repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-filter-repo b/git-filter-repo index 77fe024d..ae71fad1 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -941,7 +941,7 @@ class FastExportParser(object): # Compile some regexes and cache those self._mark_re = re.compile(br'mark :(\d+)\n$') self._parent_regexes = {} - parent_regex_rules = (b' :(\d+)\n$', b' ([0-9a-f]{40})\n') + parent_regex_rules = (br' :(\d+)\n$', br' ([0-9a-f]{40})\n') for parent_refname in (b'from', b'merge'): ans = [re.compile(parent_refname+x) for x in parent_regex_rules] self._parent_regexes[parent_refname] = ans