<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Garamond,Georgia,serif;" dir="ltr">
<p>Hi,</p>
<p><br>
</p>
<p>I had a question on how does diffoscope decide which files to diff after it has diff-ed the root paths?</p>
<p><br>
</p>
<p>From the description of diffoscope, it is clear that it would first <a href="https://salsa.debian.org/reproducible-builds/diffoscope/-/blob/master/diffoscope/main.py?ref_type=heads#L718" class="OWAAutoLink">
compare_root_paths</a> and then recursively unpack if it is an archive to find diffs between the files. My question is how does it know which files to diff over? For example, consider the diff output below between two jars. It first runs some zip archive related
tools and then shows the diff between the files (MANIFEST and properties file) that was actually causing the changes in the archive. Does diffoscope know about these files from zipinfo/zipnote/zipdetails output or does it simply diff over all files in the
archive?</p>
<p><br>
</p>
<p><br>
</p>
<p>```json</p>
<p></p>
<div style="color: #d6d6dd;background-color: #181818;font-family: 'Droid Sans Mono', 'monospace', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;">
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"diffoscope-json-version"</span><span style="color: #d6d6dd;">:
</span><span style="color: #ebc88d;">1</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"/target/reference/ch.qos.logback.db/logback-access-db-1.2.11.1.jar"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"/logback-access-db/target/logback-access-db-1.2.11.1.jar"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"unified_diff"</span><span style="color: #d6d6dd;">: null,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"details"</span><span style="color: #d6d6dd;">: [</span></div>
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipinfo {}"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipinfo {}"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"unified_diff"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"@@ -1,23 +1,23 @@</span></div>
<div><span style="color: #e394dc;">-Zip file size: 10358 bytes, number of entries: 21</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 META-INF/</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 130 bl defN 22-Apr-20 20:27 META-INF/MANIFEST.MF</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/qos/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/qos/logback/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/qos/logback/access/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/qos/logback/access/db/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 ch/qos/logback/access/db/script/</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 4952 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/DBAppender.class</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1378 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/db2.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1001 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/db2l.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1011 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/hsqldb.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1145 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/msSQLServer.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1291 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/mysql.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1663 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/oracle.sql</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 1283 bl defN 22-Apr-20 20:27 ch/qos/logback/access/db/script/postgresql.sql</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 META-INF/maven/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 META-INF/maven/ch.qos.logback.db/</span></div>
<div><span style="color: #e394dc;">-drwxr-xr-x 2.0 unx 0 b- stor 22-Apr-20 20:27 META-INF/maven/ch.qos.logback.db/logback-access-db/</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 2897 bl defN 22-Apr-20 20:23 META-INF/maven/ch.qos.logback.db/logback-access-db/pom.xml</span></div>
<div><span style="color: #e394dc;">--rw-r--r-- 2.0 unx 135 bl defN 22-Apr-20 20:27 META-INF/maven/ch.qos.logback.db/logback-access-db/pom.properties</span></div>
<div><span style="color: #e394dc;">-21 files, 16886 bytes uncompressed, 7178 bytes compressed: 57.5%</span></div>
<div><span style="color: #e394dc;">+Zip file size: 10359 bytes, number of entries: 21</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 META-INF/</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 130 bl defN 24-Oct-18 03:03 META-INF/MANIFEST.MF</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/qos/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/qos/logback/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/qos/logback/access/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/qos/logback/access/db/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 ch/qos/logback/access/db/script/</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 4952 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/DBAppender.class</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1663 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/oracle.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1145 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/msSQLServer.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1291 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/mysql.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1378 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/db2.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1001 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/db2l.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1011 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/hsqldb.sql</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 1283 bl defN 24-Oct-18 03:03 ch/qos/logback/access/db/script/postgresql.sql</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 META-INF/maven/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 META-INF/maven/ch.qos.logback.db/</span></div>
<div><span style="color: #e394dc;">+drwxr-xr-x 2.0 unx 0 b- stor 24-Oct-18 03:03 META-INF/maven/ch.qos.logback.db/logback-access-db/</span></div>
<div><span style="color: #e394dc;">+-rw-rw-r-- 2.0 unx 2897 bl defN 24-Oct-18 03:03 META-INF/maven/ch.qos.logback.db/logback-access-db/pom.xml</span></div>
<div><span style="color: #e394dc;">+-rw-r--r-- 2.0 unx 134 bl defN 24-Oct-18 03:03 META-INF/maven/ch.qos.logback.db/logback-access-db/pom.properties</span></div>
<div><span style="color: #e394dc;">+21 files, 16885 bytes uncompressed, 7179 bytes compressed: 57.5%</span></div>
<div><span style="color: #e394dc;">"</span></div>
<div><span style="color: #d6d6dd;">},</span></div>
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipnote </span><span style="color: #d6d6dd;">\u00ab</span><span style="color: #e394dc;">TEMP</span><span style="color: #d6d6dd;">\u00bb</span><span style="color: #e394dc;">/diffoscope_8jqzrch0_target/tmpa4tdz64e_.zip"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipnote </span><span style="color: #d6d6dd;">\u00ab</span><span style="color: #e394dc;">TEMP</span><span style="color: #d6d6dd;">\u00bb</span><span style="color: #e394dc;">/diffoscope_8jqzrch0_target/tmpa4tdz64e_.zip"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"unified_diff"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"</span>[REMOVED FOR CONCISENESS]"</div>
<div><span style="color: #d6d6dd;">},</span></div>
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipdetails --redact --scan --utc {}"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"zipdetails --redact --scan --utc {}"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;">"unified_diff": "[REMOVED FOR CONCISENESS]"</span></div>
<div><span style="color: #d6d6dd;">},</span></div>
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"META-INF/MANIFEST.MF"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"META-INF/MANIFEST.MF"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"unified_diff"</span><span style="color: #d6d6dd;">:
</span><span style="color: #d6d6dd;">"[REMOVED FOR CONCISENESS]"</span></div>
<div><span style="color: #d6d6dd;">},</span></div>
<div><span style="color: #d6d6dd;">{</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source1"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"META-INF/maven/ch.qos.logback.db/logback-access-db/pom.properties"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"source2"</span><span style="color: #d6d6dd;">:
</span><span style="color: #e394dc;">"META-INF/maven/ch.qos.logback.db/logback-access-db/pom.properties"</span><span style="color: #d6d6dd;">,</span></div>
<div><span style="color: #d6d6dd;"></span><span style="color: #82d2ce;">"unified_diff"</span><span style="color: #d6d6dd;">:
</span><span style="color: #d6d6dd;">"[REMOVED FOR CONCISENESS]"</span></div>
<div><span style="color: #d6d6dd;">}</span></div>
<div><span style="color: #d6d6dd;">]</span></div>
<div><span style="color: #d6d6dd;">}</span></div>
</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div id="m_4935352394101912768Signature">
<div name="divtagdefaultwrapper"><font size="2" color="#808080"><span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)"><span id="divtagdefaultwrapper" style="font-size:12pt">
<div style="margin-top:0; margin-bottom:0"><span style="color:rgb(0,0,0); font-family:Garamond,Georgia,serif">Regards,</span></div>
<span style="font-family:Garamond,Georgia,serif"></span><span style="font-family:Garamond,Georgia,serif"></span><span style="color:rgb(0,0,0)"></span><span style="font-family:Garamond,Georgia,serif"></span><span style="font-family:Garamond,Georgia,serif"></span>
<div style="margin-top:0; margin-bottom:0"><span style="color:rgb(0,0,0); font-family:Garamond,Georgia,serif">Aman Sharma</span></div>
</span><br>
</span></font></div>
<div name="divtagdefaultwrapper"><font size="2" color="#808080"><span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)"></span><span class="im">PhD Student<br style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif">
<span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)">KTH Royal Institute of Technology</span><br style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif">
</span><span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)">School of Electrical Engineering and Computer Science (EECS)</span><br style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif">
<span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)">Department of Theoretical Computer Science (TCS)</span><br style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif">
<span style="font-family:Arial,"Helvetica Neue",helvetica,sans-serif; background-color:rgb(255,255,255)"><a href="http://www.kth.se" target="_blank" id="LPNoLP"></a><a href="https://www.kth.se/profile/amansha" class="OWAAutoLink" id="LPNoLP"></a><a href="https://www.kth.se/profile/amansha" class="OWAAutoLink" id="LPNoLP"></a></span></font></div>
</div>
<a href="https://www.kth.se/profile/amansha" class="OWAAutoLink" id="LPNoLP"><span style="font-size:10pt"></span></a><a href="https://algomaster99.github.io/" class="OWAAutoLink" id="LPNoLP">https://algomaster99.github.io/</a><br>
</div>
</div>
</div>
</body>
</html>