aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant @SuppressWarnings("unused")David Pursehouse2017-12-181-1/+1
| | | | | | | These are now redundant since the parameters have javadoc. Change-Id: I6bfde267e1712ee35871c30c8203c3b4dc5e136a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PathTreeFilterHandler: Remove unused importDavid Pursehouse2017-12-181-1/+0
| | | | | Change-Id: I7a91210dcb775d0c9b46772f8ff3d84196ba3b10 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix javadoc in org.eclipse.jgit.pgmMatthias Sohn2017-12-1876-42/+329
| | | | Change-Id: I74616f6e8ef69bef4db2f13a9b47ddf57714fd1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LfsStore: Make inner class AppServer staticDavid Pursehouse2017-12-061-1/+1
| | | | | | | | | | | | | FindBugs reports: This class is an inner class, but does not use its embedded reference to the object which created it. This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary. If possible, the class should be made static. Change-Id: I245e44678166176de0cfb275e22ddd159f88e0bd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove final modifier on args4j argument field in RevParseRüdiger Herrmann2017-11-191-1/+1
| | | | | | | | | | | | Args4J does no longer allow to use final fields to reference arguments or options [1]. Change RevParse to be compatibel with this change. [1] https://github.com/kohsuke/args4j/commit/6e11f89d40dcc518c0e5eb9eef5d74f05d58e6af See-also: a0558b709448cea01cc0725fff73408d9b223c72 Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Change-Id: I33b233f195c06855d9e094c8c9ba804fbe7b1438
* Checkout now reports failures through exceptions.Ned Twigg2017-10-011-8/+12
| | | | | | | | | | | Checkout sometimes throws an exception, and other times it writes an error message to outw and returns normally, even though the command failed. This commit now reports all failures through a die() exception. Change-Id: I038a5d976d95020fea3faac68e9178f923c25b28 Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
* Added API to TextBuiltin for piped usage.Ned Twigg2017-09-211-0/+33
| | | | | | | | | | Added a public method to TextBuiltin which makes it possible for clients to initialize all of its state, including output and error streams. This gives clients the ability to customize the way in which a command is run. Change-Id: If718236964d2c5cf869e120c74f1a12965f4812e Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
* Implement CommandRef.toString() to help debuggingMatthias Sohn2017-09-081-0/+8
| | | | Change-Id: If3ebed08c8f4e2cc925a97dbdd4c84410bc7c4a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Stop using deprecated CmdLineException constructorsDavid Pursehouse2017-09-068-32/+75
| | | | | | | | | | | Instead of taking a String, the constructors now take a Localizable and a variable list of format arguments. Introduce a new Format helper class in CLIText, which implements the Localizable interface, and use it in place of raw Strings. Change-Id: I241eda16e242293ceb17b3c85ae5df85bd37c658 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* UntrackedFilesHandler: Fix non-localized stringDavid Pursehouse2017-09-062-2/+6
| | | | | Change-Id: Ida7b9ddc991515ab233763f2cb985853c9143a3c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Main: Replace deprecated ExampleMode with OptionHandlerFilterDavid Pursehouse2017-09-061-2/+3
| | | | | Change-Id: I1161a82269b7f093c00c9533ed8b99b7cca0a322 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove final modifier on args4j option or argument fieldsMatthias Sohn2017-09-054-8/+8
| | | | | | | | | Remove final field modifier since args4j does no longer allow use of final fields [1]. [1] https://github.com/kohsuke/args4j/commit/6e11f89d40dcc518c0e5eb9eef5d74f05d58e6af Change-Id: Ib3dee10828d87d6b558c2e90387eadd9aa2ce260 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update args4j to 2.33Matthias Sohn2017-08-305-31/+14
| | | | | | | CQ: 11068 Change-Id: I7d52cddacff05477f646fda5f7b9f2de844922f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix compilation errors with args4j 2.0.23 and laterRobin Stocker2017-08-3010-18/+16
| | | | | | | | | | The multiValued attribute on @Option was removed. When the field is a List, it's not actually needed (even with earlier versions of args4j), see RmTest. In other cases, we have a custom handler, where it's also not needed. Bug: 413163 Change-Id: I4bb951e9fab5f4ae4271bd7e11be799dc234ab80
* Cleanup: Organize importsMatthias Sohn2017-08-302-4/+4
| | | | Change-Id: I6065e59519bc42bd18f5cc5ee3ec5210764ab03c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix default directory set when setDirectory wasn't called.Joan Goyeau2017-08-251-0/+3
| | | | | | Bug: 519883 Change-Id: I46716e9626b4c4adc0806a7c8df6914309040b94 Signed-off-by: Joan Goyeau <joan@goyeau.com>
* reftable: debug toolsShawn Pearce2017-08-174-0/+924
| | | | | | | | | | | Simple debug programs to experiment with the reftable file format: debug-read-reftable debug-write-reftable debug-verify-reftable debug-benchmark-reftable Change-Id: I79db351d86900f1e58b17e922e195dff06ee71f1
* Rename extensions.refsStorage to refStorageShawn Pearce2017-08-111-1/+1
| | | | | | | This matches the proposal that has been discussed at length on git-core mailing list and seems to be the accepted convention. Change-Id: I9f6ab15144826893d1e2a4b48a2d657d6dd445ec
* Add missing newlines at ends of Java filesDavid Pursehouse2017-07-253-3/+3
| | | | | Change-Id: Iead36f53d57ead0eb3edd3f9efb63b6630c9c20c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add --match option for `jgit describe` to CLIOliver Lockwood2017-06-222-0/+8
| | | | | | | | | This adds --match option for glob(7) matchers on git tags to jgit describe in CLI. Bug: 518377 Change-Id: I745988d565dd4391e8b3e5a91bbfbae575333819 Signed-off-by: Oliver Lockwood <oliver.lockwood@cantab.net>
* Use a dedicated executor to run auto-gc in command line interfaceMatthias Sohn2017-06-111-0/+19
| | | | | | | | WorkQueue uses daemon threads so auto-gc would not be executed after short-lived commands run in command line. Hence use a dedicated executor which we shutdown when the command finishes. Change-Id: I0c2429ecfa04387389d159168ba78a020a696228 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fetch: Add --recurse-submodules and --no-recurse-submodules optionsDavid Pursehouse2017-06-113-2/+49
| | | | | | | | | | Add options to control recursion into submodules on fetch. Add a callback interface on FetchCommand, to allow Fetch to display an update "Fetching submodule XYZ" for each submodule. Change-Id: Id805044b57289ee0f384b434aba1dbd2fd317e5b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [findBugs] Use UTF-8 when writing to the error stream in jgit pgmMatthias Sohn2017-05-151-1/+4
| | | | Change-Id: Ic2555ea932dbbd1a3a6868e731f247b9754d7f09 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Clone: add --recurse-submodules optionDavid Pursehouse2017-04-272-3/+48
| | | | | | | | | | Add the --recurse-submodules option on the command, which causes submodules to also be initialized and updated. Add a callback interface on CloneCommand and SubmoduleUpdateCommand to them to provide progress feedback for clone operations. Change-Id: I41b1668bc0d0bdfa46a9a89882c9657ea3063fc1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LfsProtocolServlet: Pass HTTP Authorization header to getLargeFileRepositoryDavid Pursehouse2017-03-081-1/+1
| | | | | | | | This allows implementations to reject operations that do not include proper authentication. Change-Id: If301476d8fb56a0899e424be3789c7576097d185 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-2023-51/+51
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-196-0/+11
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Don't rely on default locale when using toUpperCase() and toLowerCase()Matthias Sohn2017-01-282-3/+6
| | | | | | | | | | | | | | | | Otherwise these methods may produce unexpected results if used for strings that are intended to be interpreted locale independently. Examples are programming language identifiers, protocol keys, and HTML tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns "t\u0131tle", where '\u0131' is the LATIN SMALL LETTER DOTLESS I character. See https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toLowerCase-- http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html Bug: 511238 Change-Id: Id8d8f37d84d62239c918b81f8d883ed798d87656 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove @since tags from internal packagesJonathan Nieder2017-01-241-2/+0
| | | | | | | | | These packages don't use @since tags because they are not part of the stable public API. Some @since tags snuck in, though. Remove them to make the convention easier to find for new contributors and the expectations clearer for users. Change-Id: I6c17d3cfc93657f1b33cf5c5708f2b1c712b0d31
* gc: Add options to preserve and prune old pack filesJames Melvin2017-01-191-0/+8
| | | | | | | | | | | | | | | | | | | The new --preserve-oldpacks option moves old pack files into the preserved subdirectory instead of deleting them after repacking. The new --prune-preserved option prunes old pack files from the preserved subdirectory after repacking, but before potentially moving the latest old packfiles to this subdirectory. These options are designed to prevent stale file handle exceptions during git operations which can happen on users of NFS repos when repacking is done on them. The strategy is to preserve old pack files around until the next repack with the hopes that they will become unreferenced by then and not cause any exceptions to running processes when they are finally deleted (pruned). Change-Id: If3f729f0d9ce920ee2c3e6acdde46f2068be61d2 Signed-off-by: James Melvin <jmelvin@codeaurora.org>
* Organize importsDavid Pursehouse2016-11-1417-46/+43
| | | | | Change-Id: I7c545d06b1bced678c020fab9af1382bc4416b6e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CheckoutCommand: Add method to add multiple pathsDavid Pursehouse2016-10-221-3/+1
| | | | | | | | The new method addPaths(List<String>) allows callers to add multiple paths without having to iterate over several calls to addPath(String). Change-Id: I2c3746a97ead7118fb0ed5543a2c843224719031 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Checkout: Add the ability to checkout all paths.Ned Twigg2016-10-221-2/+7
| | | | | | Change-Id: Ie1e59c566b63d0dfac231e44e7ebd7f3f08f3e9f Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Main: Add missing $NON-NLS tagDavid Pursehouse2016-10-181-1/+1
| | | | | Change-Id: I030910b88a8f60ca174e38f0a213959f9b0a776f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Status: remove unused lineFormat memberDavid Pursehouse2016-10-181-2/+0
| | | | | Change-Id: I3c4d83583edb1a6e1fbee1ea496dcf93302831b3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LfsStore: Don't invoke toString on String variableDavid Pursehouse2016-10-181-1/+1
| | | | | Change-Id: I15d234e5d907d0bbb22a95cf781e915798bead30 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix JGit CLI to follow native git's interpretation of http_proxy...Christian Halstrick2016-10-141-5/+16
| | | | | | | | | | | | | | | | | Native git (as many other tools) interprets the environment variables http_proxy, HTTP_PROXY, ... in a specific way. "http_proxy" has to be lowercase while "https_proxy" can be lowercase or uppercase (means: "HTTPS_PROXY"). Lowercase has precedence. This can be looked up in "ENVIRONMENT" section of [1]. Teach JGit CLI to behave similar. Additionally teach JGit not to interpret the environment variables if the java process was explicitly started with the system properties telling JVM which proxy to use. A call like "http_proxy=proxy1 java -Dhttp.proxyHost=proxy2 ..." should use proxy2 as proxy. [1] https://curl.haxx.se/docs/manpage.html Change-Id: I2ad78f209792bf8f1285cf2f8ada8ae0c28f8e5a
* Merge branch 'stable-4.5'Matthias Sohn2016-10-112-2/+2
|\ | | | | | | | | | | | | | | | | | | * stable-4.5: pgm: Fix misspelled key of an externalized string Add missing online help for Ketch server type option in CLI daemon Remove wrong junit dependencies in org.eclipse.jgit.pgm Change-Id: I9cac024c0b488101b539c713b0f5ffc8c01b55bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * pgm: Fix misspelled key of an externalized stringMatthias Sohn2016-10-021-1/+1
| | | | | | | | | | Bug: 502107 Change-Id: I76d0981c8463b63bd049f50cdc7d549fa0604b3c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add missing online help for Ketch server type option in CLI daemonMatthias Sohn2016-10-021-1/+1
| | | | | | | | Change-Id: I19d27bbdbfdb1c7a5a688e41dfcba73a142a1afd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add built-in LFS smudge filter for local caseChristian Halstrick2016-09-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Adds a JGit built-in implementation of the "git lfs smudge" filter. This filter should do the same as the one described in [1] besides that it only supports the local case when the lfs objects are already present in the media directory. Remote cases where download of LFS objects from an LFS server is needed will be done in a later commit. [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-smudge.1.ronn Change-Id: I8ff661d4edd3667ef7f86f3b4fa33e568eb4c8f4
* | Add built-in LFS clean filterChristian Halstrick2016-09-201-0/+2
|/ | | | | | | | | | | | Adds a JGit built-in implementation of the "git lfs clean" filter. This filter should do the same as the one described in [1]. But since this filter is written in Java and can be called by JGit without forking new processes it should be much faster [1] https://github.com/github/git-lfs/blob/master/docs/man/git-lfs-clean.1.ronn Change-Id: If60e387e97870245b4bd765eda6717eb84cffb1d
* CLI: implement option -d for deleting tagsNed Twigg2016-08-312-11/+24
| | | | | Change-Id: I438456b76aefd361384729686271288186d3be3b Signed-off-by: Ned Twigg <ned.twigg@diffplug.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Added a clean command.Ned Twigg2016-08-302-0/+88
| | | | | Change-Id: I05d5392789b5b64e6ee44f678556cf25dc30d7ba Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
* push: Do not use push options unless requestedStefan Beller2016-08-241-1/+3
| | | | | | | | | | | | | | | | Unless the user passed --push-option, the client does not intend to pass push options to the server. Without this change, all pushes to servers without push option support fail. Not enabling the feature (instead of enabling it and sending an empty list of options) in this case is more intuitive and matches the behavior of C git push's --push-option parameter better. Bug: 500149 Change-Id: Ia4f13840cc54d8ba54e99b1432108f1c43022c53 Signed-off-by: Stefan Beller <sbeller@google.com>
* LfsProtocolServlet: Pass request and path to getLargeFileRepositoryDavid Pursehouse2016-07-271-2/+2
| | | | | | | | | | | | Passing the request and path to the method will allow implementations to have more control over determination of the backend, for example: - return different backends for different requests - accept or refuse requests based on request characteristics - etc Change-Id: I1ec6ec54c91a5f0601b620ed18846eb4a3f46783 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Push implementation of option stringsDan Wang2016-07-221-0/+4
| | | | | | | | | | | | | Example usage: $ ./jgit push \ --push-option "Reviewer=j.doe@example.org" \ --push-option "<arbitrary string>" \ origin HEAD:refs/for/master Stefan Beller has also made an equivalent change to CGit: http://thread.gmane.org/gmane.comp.version-control.git/299872 Change-Id: I6797e50681054dce3bd179e80b731aef5e200d77 Signed-off-by: Dan Wang <dwwang@google.com>
* Replace use of deprecated method Repository.getRef()Matthias Sohn2016-05-315-9/+9
| | | | Change-Id: Iecf2b8deafc4991cc3333702fb9fa0638be7b914 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* RepoCommand: remove --record-remote-branchesStefan Beller2016-05-251-4/+0
| | | | | | | | This function only works in bare mode, and the command line works in non-bare mode, so there's no point in pretending to support it here. Change-Id: Ia017aded93d072bdb9947ec08c424256c3abe438 Signed-off-by: Stefan Beller <sbeller@google.com>
* JGit CLI: allow to call git init with specific directoryRüdiger Herrmann2016-05-221-1/+10
| | | | | | | | With this change it is possible to initialize repositories with 'git init /path/to/new/repo' Change-Id: Ia9b288b4fb34887e8f5e2f3f270e521c44d41b6a Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>