[diffoscope] 01/01: Fixed no newline being classified as order-like difference.

Mattia Rizzolo mattia at debian.org
Fri Dec 30 20:47:44 UTC 2016


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

mattia pushed a commit to branch master
in repository diffoscope.

commit ac639918e253aaebc72405d469b412603a5f14b8
Author: siamezzze <siamezzze at gmail.com>
Date:   Wed Dec 28 09:35:27 2016 +0300

    Fixed no newline being classified as order-like difference.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 diffoscope/comparators/text.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/diffoscope/comparators/text.py b/diffoscope/comparators/text.py
index 607e495..fc2f446 100644
--- a/diffoscope/comparators/text.py
+++ b/diffoscope/comparators/text.py
@@ -32,8 +32,7 @@ def order_only_difference(unified_diff):
     # Faster check: does number of lines match?
     if len(added_lines) != len(removed_lines):
         return False
-    # Counter stores line and number of its occurrences.
-    return sorted(added_lines) == sorted(removed_lines)
+    return sorted(added_lines) == sorted(removed_lines) and added_lines != removed_lines
 
 
 class TextFile(File):

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



More information about the Reproducible-commits mailing list