aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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>
* | | 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-202-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. 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-202-4/+5
| | | | | | | | | | | | 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-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-2/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Add --ssh option to command-line commandsThomas Wolf2018-11-142-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
| * 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>
* | TextBuiltin#init: Factor out a method to get the log output encodingDavid Pursehouse2018-09-301-11/+22
| | | | | | | | | | Change-Id: I87c5774722bd36ea6fe18c4b7ce22342578fa290 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | ConfigConstants: Add constants for i18n.logOutputEncodingDavid Pursehouse2018-09-301-2/+5
| | | | | | | | | | Change-Id: I6073c7fc8ec30840e2ee2e90ac4cfdb136f48b9a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | TextBuiltin: Default to UTF-8 when i18n.logOutputEncoding is not setDavid Pursehouse2018-09-301-25/+25
| | | | | | | | | | Change-Id: I69d82086c052b7ba601e0daab133573ec37c25cf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Make inner classes static where possibleDavid Pursehouse2018-09-261-1/+1
|/ | | | | | | | | | | | | As reported by Error Prone: An inner class should be static unless it references members of its enclosing class. An inner class that is made non-static unnecessarily uses more memory and does not make the intent of the class clear. See https://errorprone.info/bugpattern/ClassCanBeStatic Change-Id: Ib99d120532630dba63cf400cc1c61c318286fc41 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8David Pursehouse2018-09-045-11/+13
| | | | | Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>