[diffoscope] 05/05: Fix failing directory test

Ximin Luo infinity0 at debian.org
Sat Aug 13 03:05:03 CEST 2016


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

infinity0 pushed a commit to branch master
in repository diffoscope.

commit f07290ee644c36562a01f33edb5d4fd9088ac731
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Aug 13 02:59:45 2016 +0200

    Fix failing directory test
    
    Strip out a non-constant number of spaces so that the next column starts at the
    same position instead of giving spurious whitespace changes in the diff
---
 diffoscope/comparators/directory.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 7b28a1c..779624e 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -44,8 +44,8 @@ class Stat(Command):
         return ['stat', self.path]
 
     FILE_RE = re.compile(r'^\s*File:.*$')
-    DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d')
-    INODE_RE = re.compile(r'Inode: [0-9]+')
+    DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d\s+')
+    INODE_RE = re.compile(r'Inode: [0-9]+\s+')
     ACCESS_TIME_RE = re.compile(r'^Access: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
     CHANGE_TIME_RE = re.compile(r'^Change: [0-9]{4}-[0-9]{2}-[0-9]{2}.*$')
 

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


More information about the diffoscope mailing list