diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-20 21:13:09 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-20 22:18:40 +0100 |
commit | 8264135d7c0d6c19873444e57823b88c1a721e62 (patch) | |
tree | e43aee0b1e39b7b0c782db24ac0dd8489b90b331 /org.eclipse.jgit.pgm | |
parent | c2fb5873b445c005b40544ee47134d2eca9a61d7 (diff) | |
download | jgit-8264135d7c0d6c19873444e57823b88c1a721e62.tar.gz jgit-8264135d7c0d6c19873444e57823b88c1a721e62.zip |
pgm: Fix missing braces in DiffTree.run()
Change-Id: Ic75c7e77516ff1c26803e010bf2bdbaf3e9d6ce1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java index b6cf84165a..371395ba3f 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java @@ -84,13 +84,15 @@ class DiffTree extends TextBuiltin { final int nTree = walk.getTreeCount(); while (walk.next()) { - for (int i = 1; i < nTree; i++) + for (int i = 1; i < nTree; i++) { outw.print(':'); + } for (int i = 0; i < nTree; i++) { final FileMode m = walk.getFileMode(i); final String s = m.toString(); - for (int pad = 6 - s.length(); pad > 0; pad--) + for (int pad = 6 - s.length(); pad > 0; pad--) { outw.print('0'); + } outw.print(s); outw.print(' '); } @@ -104,12 +106,13 @@ class DiffTree extends TextBuiltin { if (nTree == 2) { final int m0 = walk.getRawMode(0); final int m1 = walk.getRawMode(1); - if (m0 == 0 && m1 != 0) + if (m0 == 0 && m1 != 0) { chg = 'A'; - else if (m0 != 0 && m1 == 0) + } else if (m0 != 0 && m1 == 0) { chg = 'D'; - else if (m0 != m1 && walk.idEqual(0, 1)) + } else if (m0 != m1 && walk.idEqual(0, 1)) { chg = 'T'; + } } outw.print(chg); |