Unlike manual splitting, 'splitlines' correctly handles different
line endings. Without this change script fails to check files with
'\r\n' endings treating the whole patch as a header.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
- for line in text.split('\n'):
+ for line in text.splitlines():
if current_file != previous_file:
previous_file = current_file
if current_file != previous_file:
previous_file = current_file