Don't reformat the source if the files are identical
If both sides are the same, there is no need to generate a new PrettyFormatter with the file content. We've already pointed to the other file's existing formatting. Change-Id: I7c75422a9e8dffccab8509b9c8d251886c0790a6 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -386,7 +386,7 @@ class PatchScriptBuilder {
|
||||
displayMethod = DisplayMethod.NONE;
|
||||
}
|
||||
|
||||
if (displayMethod == DisplayMethod.DIFF) {
|
||||
if (!reuse && displayMethod == DisplayMethod.DIFF) {
|
||||
PrettySettings s = new PrettySettings(settings.getPrettySettings());
|
||||
s.setFileName(path);
|
||||
s.setShowWhiteSpaceErrors(other != null /* side B */);
|
||||
|
||||
Reference in New Issue
Block a user