mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 02:12:17 +02:00
filter-repo: make --version more robust against modified shebangs
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
e9c2d9adb5
commit
7c877cd750
@ -1609,7 +1609,7 @@ class GitUtils(object):
|
||||
contents = f.read()
|
||||
# If people replaced @@LOCALEDIR@@ string to point at their local
|
||||
# directory, undo it so we can get original source version.
|
||||
contents = re.sub(br'^#\!/usr/bin/env python.*',
|
||||
contents = re.sub(br'\A#\!.*',
|
||||
br'#!/usr/bin/env python3', contents)
|
||||
contents = re.sub(br'(\("GIT_TEXTDOMAINDIR"\) or ").*"',
|
||||
br'\1@@LOCALEDIR@@"', contents)
|
||||
|
Loading…
Reference in New Issue
Block a user