[diffoscope] 02/02: diff: use diff_split_lines everywhere

Ximin Luo infinity0 at debian.org
Thu Sep 21 18:03:53 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository diffoscope.

commit a9bae3a6dba45b85f3e6a0f1347c13419e79c8f1
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Sep 21 17:56:45 2017 +0200

    diff: use diff_split_lines everywhere
---
 diffoscope/diff.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/diff.py b/diffoscope/diff.py
index 024310b..640a5fe 100644
--- a/diffoscope/diff.py
+++ b/diffoscope/diff.py
@@ -261,7 +261,7 @@ def diff_split_lines(diff, keepends=True):
 
 def reverse_unified_diff(diff):
     res = []
-    for line in diff.splitlines(keepends=True):
+    for line in diff_split_lines(diff):
         found = DiffParser.RANGE_RE.match(line)
 
         if found:
@@ -514,7 +514,7 @@ class SideBySideDiff(object):
         """
         self.reset()
 
-        for l in self.unified_diff.splitlines():
+        for l in diff_split_lines(self.unified_diff, False):
             self._bytes_processed += len(l) + 1
             m = re.match(r'^--- ([^\s]*)', l)
             if m:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list