Cleanup unified diff's logic to determine how to visualize differences
Change-Id: I48e363c476ecf08834f37e316e4d96b0980271f6
This commit is contained in:

committed by
Gerrit Code Review

parent
8d256d7716
commit
efe7244572
@@ -226,19 +226,18 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
|
|||||||
appendFileHeader(nc, line);
|
appendFileHeader(nc, line);
|
||||||
}
|
}
|
||||||
final ArrayList<PatchLine> lines = new ArrayList<PatchLine>();
|
final ArrayList<PatchLine> lines = new ArrayList<PatchLine>();
|
||||||
if (script.getDisplayMethodA() == DisplayMethod.IMG
|
|
||||||
|| script.getDisplayMethodB() == DisplayMethod.IMG) {
|
|
||||||
appendImageDifferences(script, nc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isDisplayBinary) {
|
if (hasDifferences(script)) {
|
||||||
if (hasDifferences(script)) {
|
if (script.getDisplayMethodA() == DisplayMethod.IMG
|
||||||
|
|| script.getDisplayMethodB() == DisplayMethod.IMG) {
|
||||||
|
appendImageDifferences(script, nc);
|
||||||
|
} else if (!isDisplayBinary) {
|
||||||
appendTextDifferences(script, nc, lines);
|
appendTextDifferences(script, nc, lines);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if (!hasDifferences(script)) {
|
|
||||||
appendNoDifferences(nc);
|
appendNoDifferences(nc);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetHtml(nc);
|
resetHtml(nc);
|
||||||
populateTableHeader(script, detail);
|
populateTableHeader(script, detail);
|
||||||
if (hasDifferences(script)) {
|
if (hasDifferences(script)) {
|
||||||
|
Reference in New Issue
Block a user