aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
* Consistently use "!isEmpty()" to detect non-empty listDavid Pursehouse2019-06-075-5/+5
| | | | | | | | | | Replace "size() > 0" with "!isEmpty()" where appropriate. In the Status implementation we can drop the check; the subsequent loop will only execute when the list is non-empty anyway. Change-Id: I355aff551a603373e702a9d44304f087b476263c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* cli: Add the --always option to describeSebastian Schuberth2019-05-312-0/+5
| | | | | Change-Id: I0342d589e4deabe9d80ea3c9c6b48d7b265d8fe6 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
* cli: Add the --tags option to describeSebastian Schuberth2019-05-312-0/+5
| | | | | Change-Id: I78924e61e2050eeaff991ee56715f36514100492 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
* Convert to lambda or member referenceCarsten Hammer2019-05-165-46/+21
| | | | | | | | | | | Convert anonymous inner classes to lambda expressions or member references Bug: 545856 CQ: 19537 Change-Id: I621431c178e8b99316314602f7c66c9a36f9ae98 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use isEmpty() instead of size()==0 where possibleCarsten Hammer2019-04-131-1/+1
| | | | | Change-Id: I97f1367a2ea9f1f6146e264c27c3981b842f2a26 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Join catch sections using multicatchCarsten Hammer2019-04-138-51/+18
| | | | | Change-Id: I1a9112e6a4f938638c599b489cb0858eca27ab91 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use String.isEmpty() instead of comparing to ""Carsten Hammer2019-04-113-4/+4
| | | | | | | | | Use of String.equals("") can be replaced with with String.length() == 0 (for JDK5 and lower) or String.isEmpty() (for JDK6 and higher) Change-Id: Id1462d22c5d249485d87993263a9239809e73c55 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Replace usage of String.indexOf with String.contains where possibleCarsten Hammer2019-04-111-1/+1
| | | | | | Change-Id: Iad3fce891077d85cf2533272c54206c33c37afd8 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge "diff: Add "--staged" as alias to "--cached""Christian Halstrick2019-03-251-1/+1
|\
| * diff: Add "--staged" as alias to "--cached"Andre Bossert2019-03-251-1/+1
| | | | | | | | | | | | | | | | | | see: https://git-scm.com/docs/git-diff "--staged is a synonym of --cached" Change-Id: Ie73f6b3d3b7179c339151cebab98f9ddee6aaf49 Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* | Replace "Checkout" by "Check out" when used as a verbThomas Wolf2019-03-152-5/+3
| | | | | | | | | | | | | | | | One occurrence in core JGit, several in jgit.pgm. One unused occurrence in jgit.pgm; remove it. Change-Id: I04c3dd9d9f542f1e1ac6df4cbf03bcefb6bfdf78 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Prepare 5.4.0-SNAPSHOT buildsMatthias Sohn2019-03-073-47/+47
|/ | | | | Change-Id: I90a4791f63d0eba23da744c720e869f1830b86e7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* diff: add option metaVar for --src-prefix and --dst-prefixAndre Bossert2019-03-042-2/+3
| | | | | | | Fixes exception if using "jgit diff --help". Bug: 544735 Change-Id: I694ff3103da4bc199dd03c40962c5be191eddcd1 Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
* pgm: Fix missing braces in Version.run()Matthias Sohn2019-01-211-2/+4
| | | | Change-Id: I4c5633846320f0324714f635b2be388b17cf79fa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in Version commandMatthias Sohn2019-01-211-2/+7
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I37e6e3aaba411858042afac02098ce9eaa06f258 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in UploadPack.run()Matthias Sohn2019-01-211-1/+2
| | | | Change-Id: I923af9b4ce62d5098828f4322a2a508bf3927bbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in UploadPack commandMatthias Sohn2019-01-211-8/+9
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ife1d8e88387a32de63b0ef31f45499babdbdde3c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Tag commandMatthias Sohn2019-01-211-1/+5
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I16b528fad74d0c5346d054b3c29070331d60db7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Status.run()Matthias Sohn2019-01-211-2/+4
| | | | Change-Id: Ie30df8ed3d9a1e676f130214a173b622eaf67c6f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Status commandMatthias Sohn2019-01-211-1/+5
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I662a343fbb46c35090bd6f840e5a35a88036a65a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in ShowRef.run()Matthias Sohn2019-01-211-1/+2
| | | | Change-Id: I92bc2008c72bd4495dc3df47a9dd7eb242aab30f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in ShowRef commandMatthias Sohn2019-01-211-6/+10
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: If18a5d8013f1cb393af3a5e5a1ec9613ac2151bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Show.run()Matthias Sohn2019-01-211-3/+5
| | | | Change-Id: I50097649f1355856e342035d54c55e65270ef507 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Show commandMatthias Sohn2019-01-211-2/+5
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I1c6cc5ecdc44b81e5f3f9b7dc64c3653de5475ba Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Rm commandMatthias Sohn2019-01-211-1/+2
| | | | Change-Id: I5ad2f02516917bbd02aa0eb4fb6b05d4b06dc670 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Rm commandMatthias Sohn2019-01-211-1/+4
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I55c15a35369e790a3ca946d6db0097a57ac6fae5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in RevParse commandMatthias Sohn2019-01-211-18/+23
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Iae510d8c6af9acd587822a28ad48eab0b2a96ccd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Externalize error messageMatthias Sohn2019-01-213-1/+4
| | | | Change-Id: Id9e33104c9681dc9a57674c1648c994a503fa6b8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Reset.run()Matthias Sohn2019-01-211-5/+10
| | | | Change-Id: I1e854ab81063601eb4ff159aabc559cb65ce6ece Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Reset commandMatthias Sohn2019-01-211-1/+4
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I70dce366081cd1fc4539cf195d6310fef1080eb3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Repo commandMatthias Sohn2019-01-211-6/+11
| | | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I1a636478bfae8cc0635a3e57be252126e69c19cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Remote commandMatthias Sohn2019-01-211-1/+3
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ie1985c2570213217c2ea0f376ff99d19bfed4e0c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Reflog commandMatthias Sohn2019-01-211-1/+5
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Id25eb523c12c07cbd14e31edfb8b5d7ec9b3ccf3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in ReceivePack commandMatthias Sohn2019-01-211-2/+9
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I9cecd236a8df8a2c2972d5da6031a121f25b1daa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge: Avoid non-localised literal string warning for "recursive"David Pursehouse2019-01-211-8/+5
| | | | | | | | Instead of using the literal string, take the name from the RECURSIVE enum value. Change-Id: I9d8f289232dfc8f784287029c41714ddbdee232b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* pgm: Fix missing braces in Push.run()Matthias Sohn2019-01-211-2/+4
| | | | Change-Id: I7cc1b3ca022ba131c196d72c1b776de942442b7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Push commandMatthias Sohn2019-01-211-1/+4
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I7a5dc6b1ebaad6f7b8baa35ce68760b79bab8acd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in MergeBase.run()Matthias Sohn2019-01-211-2/+4
| | | | Change-Id: I625053ceb5a81bc0014f7cab0f9fb5e5deaacc36 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in MergeBase commandMatthias Sohn2019-01-211-10/+15
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I5f198f71adfbb43ec1af26285658a5d5bdfa1904 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Merge commandMatthias Sohn2019-01-211-10/+18
| | | | Change-Id: I39495d832ff4e48a97182faef88871902d3edb11 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Merge commandMatthias Sohn2019-01-211-90/+100
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I7afd038d8def9d2f409c0ed297b9db8ea2fc75c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in LsTree.run()Matthias Sohn2019-01-211-2/+4
| | | | Change-Id: Iac1755c2ec8094cd211bbc9f1d819cc8052e20cb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in LsTree commandMatthias Sohn2019-01-211-1/+4
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ib3ae59eeb90143eca1a0b515c59457a0eb2cc383 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in LsRemote.run()Matthias Sohn2019-01-211-1/+2
| | | | Change-Id: I779a6c28f7e8c4ba0527eb872454fd2cc3d81304 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in LsRemote commandMatthias Sohn2019-01-211-6/+11
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: If7dd168f3e8d2b729f1eab48d4e95fe837bb7a33 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in LsFiles commandMatthias Sohn2019-01-211-1/+5
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: I7d71e194f0a7e4180094a9b36dbb55dd90c9722e
* pgm: Fix missing braces in Log.run()Matthias Sohn2019-01-211-3/+4
| | | | Change-Id: I3e4f41150aeeffc8c609ef14ce5b6d428c4595d7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Log commandMatthias Sohn2019-01-211-1/+3
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ibca80cf2195db01298f2b95f507cfa3de2f403e7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Init commandMatthias Sohn2019-01-211-5/+12
| | | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ib8b26a6a02903de63ef58687a4a0820649d59f99 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in IndexPack commandMatthias Sohn2019-01-211-1/+4
| | | | | | | This avoids we show a stacktrace on the console by default when this type of exception is thrown during the run method is executed. Change-Id: Ie8a8388daecb0500f04197462210606c42f143c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>