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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (!hasDifferences(script)) {
|
||||
} else {
|
||||
appendNoDifferences(nc);
|
||||
}
|
||||
|
||||
resetHtml(nc);
|
||||
populateTableHeader(script, detail);
|
||||
if (hasDifferences(script)) {
|
||||
|
Reference in New Issue
Block a user