[Git][reproducible-builds/diffoscope][master] Don't an exit code of 0 if we encounter with a file whose human-readable...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Tue Jan 25 00:01:45 UTC 2022



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
6ae98df8 by Chris Lamb at 2022-01-24T16:01:35-08:00
Don't an exit code of 0 if we encounter with a file whose human-readable metadata matches literal file contents. (Closes: Debian:#1004198)

- - - - -


1 changed file:

- diffoscope/comparators/utils/compare.py


Changes:

=====================================
diffoscope/comparators/utils/compare.py
=====================================
@@ -76,6 +76,13 @@ def compare_root_paths(path1, path2):
             if difference is None:
                 difference = Difference(file1.name, file2.name)
             difference.add_details(meta)
+
+    if difference is None and type(file1) is not type(file2):
+        difference = Difference(file1.name, file2.name)
+        difference.add_comment(
+            "Types of files differ; human-readable metadata may match literal file contents."
+        )
+
     return difference
 
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/6ae98df8a74662dc6e2284573015e2aa6e9643b9

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/6ae98df8a74662dc6e2284573015e2aa6e9643b9
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20220125/ddaf2719/attachment.htm>


More information about the rb-commits mailing list