mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-06 18:32:14 +02:00
filter-repo: avoid coverage testing renames from fast-export
We don't run fast-export with rename detection, even though we have code for handling it, because we decided to use a rev-list|diff-tree pipeline instead. The code was manually tested and determined to be working and it might be useful in the future so I don't want to just outright delete it, but since we know we can't trigger it right now, add a # pragma: no cover on these lines so it doesn't show up on coverage reports. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
0e4d48158f
commit
690c824fad
@ -498,7 +498,7 @@ class FileChanges(_GitElement):
|
|||||||
self.blob_id = id_
|
self.blob_id = id_
|
||||||
|
|
||||||
# For 'R' file changes (rename), expect to have newname as third arg
|
# For 'R' file changes (rename), expect to have newname as third arg
|
||||||
elif type_ == 'R':
|
elif type_ == 'R': # pragma: no cover (now avoid fast-export renames)
|
||||||
if id_ is None:
|
if id_ is None:
|
||||||
raise SystemExit("new name needed for rename of %s" % filename)
|
raise SystemExit("new name needed for rename of %s" % filename)
|
||||||
self.filename = (self.filename, id_)
|
self.filename = (self.filename, id_)
|
||||||
@ -980,7 +980,7 @@ class FastExportFilter(object):
|
|||||||
path = PathQuoting.dequote(path)
|
path = PathQuoting.dequote(path)
|
||||||
filechange = FileChanges('D', path)
|
filechange = FileChanges('D', path)
|
||||||
self._advance_currentline()
|
self._advance_currentline()
|
||||||
elif changetype == 'R':
|
elif changetype == 'R': # pragma: no cover (now avoid fast-export renames)
|
||||||
rest = self._currentline[2:-1]
|
rest = self._currentline[2:-1]
|
||||||
if rest.startswith('"'):
|
if rest.startswith('"'):
|
||||||
m = self._quoted_string_re.match(rest)
|
m = self._quoted_string_re.match(rest)
|
||||||
|
Loading…
Reference in New Issue
Block a user