[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:09 UTC 2022



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
ea0312f0 by Chris Lamb at 2022-01-24T16:00:36-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:#1004312)

- - - - -


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/ea0312f05cb09e1af8909b536530f364b40a80f8

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/ea0312f05cb09e1af8909b536530f364b40a80f8
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/19c88f75/attachment.htm>


More information about the rb-commits mailing list