pgm: Fix missing braces in Diff.run()
Change-Id: I326b85f49d9b2f3c753f8a38e3f65ee61ba35db3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
a6212392d5
commit
e2d1736e69
|
@ -184,8 +184,9 @@ protected void run() {
|
|||
if (cached) {
|
||||
if (oldTree == null) {
|
||||
ObjectId head = db.resolve(HEAD + "^{tree}"); //$NON-NLS-1$
|
||||
if (head == null)
|
||||
if (head == null) {
|
||||
die(MessageFormat.format(CLIText.get().notATree, HEAD));
|
||||
}
|
||||
CanonicalTreeParser p = new CanonicalTreeParser();
|
||||
try (ObjectReader reader = db.newObjectReader()) {
|
||||
p.reset(reader, head);
|
||||
|
@ -196,15 +197,17 @@ protected void run() {
|
|||
} else if (oldTree == null) {
|
||||
oldTree = new DirCacheIterator(db.readDirCache());
|
||||
newTree = new FileTreeIterator(db);
|
||||
} else if (newTree == null)
|
||||
} else if (newTree == null) {
|
||||
newTree = new FileTreeIterator(db);
|
||||
}
|
||||
|
||||
TextProgressMonitor pm = new TextProgressMonitor(errw);
|
||||
pm.setDelayStart(2, TimeUnit.SECONDS);
|
||||
diffFmt.setProgressMonitor(pm);
|
||||
diffFmt.setPathFilter(pathFilter);
|
||||
if (detectRenames != null)
|
||||
if (detectRenames != null) {
|
||||
diffFmt.setDetectRenames(detectRenames.booleanValue());
|
||||
}
|
||||
if (renameLimit != null && diffFmt.isDetectRenames()) {
|
||||
RenameDetector rd = diffFmt.getRenameDetector();
|
||||
rd.setRenameLimit(renameLimit.intValue());
|
||||
|
@ -213,7 +216,6 @@ protected void run() {
|
|||
if (showNameAndStatusOnly) {
|
||||
nameStatus(outw, diffFmt.scan(oldTree, newTree));
|
||||
outw.flush();
|
||||
|
||||
} else {
|
||||
diffFmt.format(oldTree, newTree);
|
||||
diffFmt.flush();
|
||||
|
|
Loading…
Reference in New Issue