make diff block regex more general

This commit is contained in:
Bence Pőcze 2024-02-13 17:20:34 +01:00
parent b8f095e1a9
commit 109edc9ee5
No known key found for this signature in database
GPG Key ID: 2F988827992554FD

View File

@ -29,7 +29,7 @@ class ShiftedLines(Sized, Iterable):
class LineShiftChecker:
SUBMODULE_MODE = '160000'
DIFF_BLOCK_REGEX = r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@'
DIFF_BLOCK_REGEX = r'@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@'
def __init__(self, revision_since: str, revision_until: str) -> None:
self.revision_since = revision_since