aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* pgm: Fix missing braces in Fetch.run()Matthias Sohn2019-01-201-8/+14
| | | | Change-Id: I4655417fd879733a357bf712a486ce0883021198 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle IOException in Fetch commandMatthias Sohn2019-01-201-2/+2
| | | | | | | 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: If8be68621c7135435cd067ef638460b175786b1b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Gc commandMatthias Sohn2019-01-201-5/+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: I4d3c04b27727762870d3135228768aae177ea3fc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in DiffTree.run()Matthias Sohn2019-01-201-5/+8
| | | | Change-Id: Ic75c7e77516ff1c26803e010bf2bdbaf3e9d6ce1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in DiffTree commandMatthias Sohn2019-01-201-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: I087b3e510682c68cae74c069b10050c7acb48a29 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Diff.run()Matthias Sohn2019-01-201-4/+6
| | | | Change-Id: I326b85f49d9b2f3c753f8a38e3f65ee61ba35db3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Diff commandMatthias Sohn2019-01-201-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: Iba0e4338381519dc55c2892d95181ddfb881adf2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* RawParseUtils: Avoid import of java.nio.charset.StandardCharsetsDavid Pursehouse2019-01-201-2/+1
| | | | | | | | | The import is only needed because of a reference to it in the Javadoc, and can be avoided by explicitly specifying the package instead, which is how it's referenced in other cases (Constants, FileHeader). Change-Id: I0c6254a9adf1f52fb8f2c04a858b11696ad264f5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Consistently import constants from StandardCharsets as staticDavid Pursehouse2019-01-207-29/+27
| | | | | Change-Id: I143c242c0e3299323ae166a59947b1195539e6bf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LocalDiskRepositoryTestCase#createRepository: Default auto-close to falseDavid Pursehouse2019-01-202-8/+11
| | | | | | | | | | | | | | | | | | | | | | Since 8ed59c5 ("Make TestRepository AutoCloseable", Jan 11, 2019) the TestRepository class is auto-closeable, but instantiations of it were not converted to use try-with-resource. Converting to try-with-resource results, in several cases, in the repository being closed twice because LocalDiskRepositoryTestCase has logic to close created repositories in the tearDown method. This results in several tests emitting a warning to the console: close() called when useCnt is already zero Change the default behavior of the createRepository method to not use the auto-close logic in LocalDiskRepositoryTestCase, so that thy will instead be closed (only once) using the AutoCloseable implementation. Deprecate the method that has the autoClose parameter. Change-Id: I63d62c9913f9b61271667861dae144e551d358c1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* UploadPack: Suppress false-positive resource leak warningDavid Pursehouse2019-01-201-0/+1
| | | | | Change-Id: Ida09cabb11740e6752a6f079d0528d38021fa2dd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PushConnectionTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-8/+9
| | | | | Change-Id: I539b3acea8da914fc745e54b0bf104cf344c181c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* MergerTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-8/+9
| | | | | Change-Id: I1c4bd2fd5f0ad7112bd3ebe1506de3cf51231b36 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* MergeCommandTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-26/+31
| | | | | Change-Id: If620f6a98c5e8436a3edb4ee365ec02f41d0ea6a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PackWriterTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-36/+37
| | | | | Change-Id: Ia4202c860b851bef5db72ea6781b3e6a32484e08 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ReceivePackAdvertiseRefsHookTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-232/+251
| | | | | Change-Id: I7ab1de3516ac542821275add908ee70c427d781b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* SubmoduleStatusTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-47/+51
| | | | | Change-Id: Iebb6abd35fa5b084a4c044e416a448785a3c9291 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* UploadPackTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-185/+194
| | | | | Change-Id: Id37a07b00584aa8a884fa11cd6f42a16b44e77f3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PackParserTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-18/+34
| | | | | Change-Id: Ie3521f40ac80bc58df95f9f5dc79d51b29380461 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* SmartClientSmartServerTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-4/+12
| | | | | Change-Id: If1351920398f574b5b93be55868c157c3cd15290 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommandDavid Pursehouse2019-01-203-10/+12
| | | | | Change-Id: I5234474b359a32bdae501b181f0726be2af1ec6a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* SmartClientSmartServerTest: Stop using deprecated Repository#hasObjectDavid Pursehouse2019-01-201-4/+4
| | | | | Change-Id: I75d1105934aeaac89476603e15cf642a65a3acbe Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DumbClientSmartServerTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-1/+4
| | | | | Change-Id: Ica172a85ec9b7da1416ff1b22699809f2c8c9df7 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DumbClientDumbServerTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-1/+4
| | | | | Change-Id: Iaf339ae739689d4528a079776d6e945ba9006368 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DirCacheCheckoutTest: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-2/+2
| | | | | Change-Id: Iaf18ce230d6bf9b8bcb1895dd1bd3e4eb267de10 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpTestCase#fsck: Open TestRepository in try-with-resourceDavid Pursehouse2019-01-201-3/+4
| | | | | Change-Id: Ibda8c9970322871abf0fcf1244977bed04eaedd2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CheckoutCommandTest: Add comment to document intentionally empty catch blockDavid Pursehouse2019-01-201-0/+1
| | | | | Change-Id: I5156c3c2de67be015ef1d785fcf6084919765635 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* pgm: Fix missing braces in Describe.run()Matthias Sohn2019-01-201-2/+4
| | | | Change-Id: I09e777fd4e77869952d2614ac2cde508b96d61e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Describe commandMatthias Sohn2019-01-201-1/+6
| | | | | | | 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: Ic5d9d94c4a451f300fb7ad3f71b3e22db9a2c181 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Config commandMatthias Sohn2019-01-203-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. Also externalize error message. Change-Id: I909dc77385a672d8298053b12683c0cbbf9f2aa2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix too wide lines in Commit.run()Matthias Sohn2019-01-203-5/+6
| | | | Change-Id: I695d1771b808217b0fbde29805e53a819d8c3303 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Fix missing braces in Commit.run()Matthias Sohn2019-01-201-9/+16
| | | | Change-Id: Ia9e7e846ba1abfdb490896e5bcb82e2c0039439c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Commit commandMatthias Sohn2019-01-201-6/+6
| | | | | | | | 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: Idf5325bcc235fbcf4418239a1d49572409576a7d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Clean commandMatthias Sohn2019-01-201-1/+6
| | | | | | | 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: Ic06bf16c9bfc79753a9ec767f8030a12887df168 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Fetch commandMatthias Sohn2019-01-201-0/+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: I043838143df7280351186ee1bcca4d1cc4832257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix missing braces in Branch.run()Matthias Sohn2019-01-201-5/+10
| | | | Change-Id: Ie8a757552846d2454017a95e20dc14fdf6a93982 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle exceptions in Branch commandMatthias Sohn2019-01-201-10/+15
| | | | | | | This avoids we show a stacktrace on the console by default when one of the expected exceptions is thrown during the run method is executed. Change-Id: Ib07cc8dd26b45b62de1d77739380eb36833082f1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix missing braces in Blame.run()Matthias Sohn2019-01-201-16/+30
| | | | Change-Id: I32a0e973bc73e85a67e975b728b425c148059b81 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle NoWorkTreeException and IOException in Blame commandMatthias Sohn2019-01-201-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: I9290b057b004e9ee4137d968ba4f5759442aacb6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use try-with-resource for reader in Blame.run()Matthias Sohn2019-01-171-10/+8
| | | | Change-Id: I115aa9854fefeccc2348686e6377b30413911c17 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* pgm: Handle GitAPIException in Add commandMatthias Sohn2019-01-171-0/+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: I02940bdc1645c1d5e0abeeb4f1bafde1b8c54a1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Implement signing commits using BouncyCastleMedha Bhargav Prabhala2019-01-1628-46/+951
| | | | | | | | | | | | | This also includes a change to generating the jgit CLI jar. Shading is no longer possible because it breaks the signature of BouncyCastle. Instead, the Spring Boot Loader Maven plug-in is now used to generate an executable jar. Bug: 382212 Change-Id: I35ee3d4b06d9d479475ab2e51b29bed49661bbdc Also-by: Gunnar Wagenknecht <gunnar@wagenknecht.org> Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org> Signed-off-by: Medha Bhargav Prabhala <mprabhala@salesforce.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add signing options to commit CLIMedha Bhargav Prabhala2019-01-162-0/+130
| | | | | | | | Bug: 382212 Change-Id: I02194fc566dd5baa963424b1bac78607964436a3 Also-by: Gunnar Wagenknecht <gunnar@wagenknecht.org> Signed-off-by: Medha Bhargav Prabhala <mprabhala@salesforce.com> Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
* Allow CommitCommand to sign commitsGunnar Wagenknecht2019-01-169-1/+735
| | | | | | | | | | | | This change introduces the concept of a GpgSigner which will sign commits. The GpgSigner will be of a specific implementation (eg., Bouncycastle or OpenPgP executable). The actual implementation is not part of this change. Bug: 382212 Change-Id: Iea5da1e885c039e06bc8d679d46b124cbe504c8e Also-by: Medha Bhargav Prabhala <mprabhala@salesforce.com> Signed-off-by: Medha Bhargav Prabhala <mprabhala@salesforce.com> Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>