aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Stop using deprecated methods of RemoteSetUrlCommand/RemoteRemoveCommandDavid Pursehouse2019-01-201-4/+5
| | | | | Change-Id: I5234474b359a32bdae501b181f0726be2af1ec6a 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-163-36/+17
| | | | | | | | | | | | | 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>
* pgm: propagate generic exceptions when throwing Die exceptionMatthias Sohn2019-01-163-6/+6
| | | | | | | | | | | | | If a command is stopped by throwing a Die exception since a generic exception was caught this exception contains additional information which is not available in the error message. Hence chain it to the Die exception in order to allow printing a complete stacktrace including causes to the error stream of the JGit command line by adding option --show-stack-trace, e.g. $ jgit --show-stack-trace commit -m "test" Change-Id: I7ad8c56b997ab60d2bd08f4e7b4d0b80c84021c3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix "jgit checkout -f" to overwrite dirty worktree filesChristian Halstrick2019-01-082-3/+8
| | | | | | | | | | | | | | | | | CheckoutCommand had a setForce() method. But this didn't correspond to native git's 'git checkout -f' option. Deprecate the old setForce() method and move its implementation to a new method setForceRefUpdate() and use it to implement the -B option in the CLI class Checkout. Add a setForced() method and use it to fix the associated '-f' option of the CLI Checkout class to behave like native git's 'git checkout -f' which overwrites dirty worktree files during checkout. This is still not fully matching native git's behavior: updating additionally dirty index entries is not done yet. Bug: 530771 Change-Id: I776b78eb623b6ea0aca42f681788f2e4b1667f15 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.3.0-SNAPSHOT buildsMatthias Sohn2018-12-033-47/+47
| | | | | Change-Id: I8951c2cf650cc3e41d2baa0b330b94468cfed5c2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Apache MINA sshd client: proxy supportThomas Wolf2018-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | This is not about the ssh config ProxyCommand but about programmatic support for HTTP and SOCKS5 proxies. Eclipse allows the user to specify such proxies, and JSch at least contains code to connect through proxies. So our Apache MINA sshd client also should be able to do this. Add interfaces and provide two implementations for HTTP and SOCKS5 proxies. Adapt the core code to be able to deal with proxy connections at all. The built-in client-side support for this in sshd 2.0.0 is woefully inadequate. Tested manually by running proxies and then fetching various real- world repositories via these proxies from different servers. Proxies tested: ssh -D (SOCKS, anonymous), tinyproxy (HTTP, anonymous), and 3proxy (SOCKS & HTTP, username-password authentication). The GSS-API authentication is untested since I have no Kerberos setup. Bug: 520927 Change-Id: I1a5c34687d439b3ef8373c5d58e24004f93e63ae Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Format org.eclipse.jgit.pgm/BUILD with buildifierDavid Pursehouse2018-11-141-1/+1
| | | | | Change-Id: I08de1e262c56ffdd9f4bc9b58f7b43964cce969a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add --ssh option to command-line commandsThomas Wolf2018-11-146-0/+86
| | | | | | | | | | | | | | | Enables using the new ssh client based on Apache MINA sshd instead of the old JSch client. The default is still JSch, so unless the command is invoked with --ssh apache, there's no change. I prefer this over some fiddling with the GIT_SSH environment variable since that variable is handled in the JGit core bundle, which should remain free of any dependency to org.eclipse.jgit.ssh.apache to avoid problems in Gerrit or other JGit users that may use a different Apache MINA sshd version. Bug: 520927 Change-Id: I8460759c7113ef7887520fb0d297aa312200c69f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* CLIText: Fix typo: remotes's -> remote'sDavid Pursehouse2018-10-291-1/+1
| | | | | Change-Id: I28494ffff6cd8042ef5f3de7da976d4a1569fe10 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CLIText: Fix typo: 'amd' -> 'and'David Pursehouse2018-10-291-1/+1
| | | | | Change-Id: Ifa48c35f413bd1a92946ea54c1c7adc0d53ebc78 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Disable Eclipse warning about unrecognized @SuppressWarnings valueDavid Pursehouse2018-10-171-1/+1
| | | | | | | | | | | | | The code base has several @SuppressWarnings annotations to suppress warnings raised by Error Prone, but those are not recognized by Eclipse and there is currently no way to tell it about them [1]. Suppress them for now. [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392045 Change-Id: I3de7cfa8ad4370ca5be71e1303879c73ab6829c1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-5.1'Matthias Sohn2018-10-061-10/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.3-SNAPSHOT builds JGit v5.1.2.201810061102-r Prepare 4.11.5-SNAPSHOT builds JGit v4.11.4.201810060650-r Fix configuration of maven-javadoc-plugin Prepare 4.9.7-SNAPSHOT builds JGit v4.9.6.201810051924-r Prepare 4.7.6-SNAPSHOT builds JGit v4.7.5.201810051826-r BaseReceivePack: Validate incoming .gitmodules files ObjectChecker: Report .gitmodules files found in the pack SubmoduleAddCommand: Reject submodule URIs that look like cli options Revert "Configure WindowCache settings to use in JGit CLI" Change-Id: I833d30d6de75b097377872c000b2ef5a1b96cf89 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.1.3-SNAPSHOT buildsMatthias Sohn2018-10-063-46/+46
| | | | | | | | | | Change-Id: I75c1a01885115fc709ab37f181234264c3f7423a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.1.2.201810061102-rv5.1.2.201810061102-rMatthias Sohn2018-10-063-4/+4
| | | | | | | | | | Change-Id: Id34e4ae12a796460862edc37c5eb072314199bf4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Revert "Configure WindowCache settings to use in JGit CLI"Matthias Sohn2018-10-051-10/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit e6375445d143d0335a9f5707e9bae1644cbef576. Hard coding WindowCache settings wasn't a good idea, this prevents that custom settings can be configured. Also using virtual memory mapping has issues on Windows. Bug: 539789 Change-Id: I37434581f9e3db2f1d7442d893f0dda0c2488d93 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.1.2-SNAPSHOT buildsMatthias Sohn2018-09-183-46/+46
| | | | | | | | | | Change-Id: I095d246e27de747a234bc058725454c222be51ce Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.1.1.201809181055-rv5.1.1.201809181055-rMatthias Sohn2018-09-183-4/+4
| | | | | | | | | | Change-Id: I2366444fca125139eadb6d513be721167a266d70 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.1.1-SNAPSHOT buildsMatthias Sohn2018-09-113-46/+46
| | | | | | | | | | Change-Id: Ie220dd95fae18f894e2a04a5ae6d29a1e5a6d76b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>