summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
Commit message (Collapse)AuthorAgeFilesLines
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-2024-52/+52
| | | | | | | | | | 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-197-1/+12
| | | | | | | | | | | | | | | | | | | | | | | 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-192-0/+10
| | | | | | | | | | | | | | | | | | | 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>
* Prepare 4.7.0-SNAPSHOT buildsMatthias Sohn2016-12-273-43/+43
| | | | | Change-Id: I20754d13007e6591d36aae5766f3a9a82b24e120 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.6.1-SNAPSHOT buildsMatthias Sohn2016-12-243-43/+43
| | | | | Change-Id: I6b05a6f6c3f92365c272e1bdaf76093ca01f2d58 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.6.0.201612231935-rv4.6.0.201612231935-rMatthias Sohn2016-12-243-4/+4
| | | | | Change-Id: Iaa88fe1b195dfe6be99a7b4cb064684e75563715 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* 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
* Add dependency to org.apache.commons.logging used by Apache HttpClientMatthias Sohn2016-10-131-0/+1
| | | | | | | Without this dependency running JGit CLI in Eclipse will hit ClassNotFoundExceptions when HttpClient is trying to log something. Change-Id: I2d50d9a18fac4c302de2c3a16c07f90ce3e5072e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.5'Matthias Sohn2016-10-114-13/+4
|\ | | | | | | | | | | | | | | | | | | * 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-022-1/+3
| | | | | | | | Change-Id: I19d27bbdbfdb1c7a5a688e41dfcba73a142a1afd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Remove wrong junit dependencies in org.eclipse.jgit.pgmMatthias Sohn2016-10-021-11/+0
| | | | | | | | | | Bug: 503010 Change-Id: I8fa99f53020af41eb15c1f63b6f3ba094d56bfef Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 4.5.1-SNAPSHOT buildsMatthias Sohn2016-09-213-42/+42
| | | | | | | | | | Change-Id: I3305e8a09a3fb06f25a316cff2bdbb551d3ade68 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v4.5.0.201609210915-rv4.5.0.201609210915-rMatthias Sohn2016-09-213-4/+4
| | | | | | | | | | Change-Id: Idc02a1a1d74f84605d764c239803f0cfbad94eb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | pgm, test: Add missing dependency for buck buildDavid Pursehouse2016-09-221-0/+1
| | | | | | | | | | Change-Id: I26d69fb6d35c6fb120360ef143d1b1f565d4014c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn2016-09-203-5/+5
| | | | | | | | | | Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 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-202-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Prepare 4.6.0-SNAPSHOT buildsMatthias Sohn2016-09-193-42/+42
|/ | | | | Change-Id: Id2eafc331ee32c332c2a9b867b05c260beb0d10f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* CLI: implement option -d for deleting tagsNed Twigg2016-08-313-11/+26
| | | | | 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-304-0/+94
| | | | | 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>
* Ignore 'The value of exception parameter is not used' warningDavid Pursehouse2016-07-261-0/+1
| | | | | Change-Id: I50407e4a33e35b718ca40503fdd436f1f9f70fba 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>
* Prepare 4.5.0-SNAPSHOT buildsMatthias Sohn2016-06-013-42/+42
| | | | | Change-Id: I572fe9fea0e5ca0bec4648c916ae95a5b1ccf125 Signed-off-by: Matthias Sohn <matthias.sohn@sap.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-252-5/+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>
* Redirect all Show output to outsRüdiger Herrmann2016-05-211-2/+8
| | | | | | | | The Show command wrote all diffs to System.out instead of 'outs. Bug: 494143 Change-Id: Ibc78e9a058b7a32d536e03e294c1d933b6c26ba7 Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.4.0-SNAPSHOT buildsMatthias Sohn2016-04-083-42/+42
| | | | | Change-Id: If3162f4cc4ae6319b9f1e3293549485b039cfe7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3.1-SNAPSHOT versionsMatthias Sohn2016-04-083-42/+42
| | | | | Change-Id: I52c98ba8fb3a303269a1f9380af114b6dd8c5009 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071810-rv4.3.0.201604071810-rMatthias Sohn2016-04-083-4/+4
| | | | | Change-Id: I902cdf1ff92ce8c6e9d80c4965d8d5bd8b9ac6c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071045-rMatthias Sohn2016-04-073-4/+4
| | | | | Change-Id: Iafab78d6be34d31a13f979b7be67611135c0f8bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3-SNAPSHOT buildsMatthias Sohn2016-04-053-4/+4
| | | | | Change-Id: Ib831f8870938113bd5338763f90a07d5c108b1de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201603230630-rc1v4.3.0.201603230630-rc1Matthias Sohn2016-03-233-4/+4
| | | | | Change-Id: I10835e5aa3618e5033424595942cc1649152cb24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix RebuildRefTree trying to add HEAD twice to RefTreeMatthias Sohn2016-03-051-1/+1
| | | | | | | | | | | | | | | | | | | 14dfa70520 fixed the problem that HEAD wasn't added to the reftree when rebuilding the reftree in an empty repository where HEAD isn't yet resolvable. Since non-resolvable refs are filtered out by RefDatabase.getRefs(ALL) we have to add HEAD to the reftree explicitly in this special case. This fix resulted in another bug: rebuilding the reftree in a repository which has a resolvable HEAD failed with a DirCacheNameConflictException in RefTree.apply(). If HEAD is resolvable RefDatabase.getRefs(ALL) does not filter out HEAD. This results in two identical CREATE commands for HEAD which RefTree.apply() refuses to execute. Fix this by no longer creating a duplicate CREATE command for HEAD. See: I46cbc2611b9ae683ef7319dc46af277925dfaee5 Change-Id: I58dd6bcdef88820aa7de29761d43e2edfa18fcbe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix help text for option --enable of command debug-rebuild-ref-treeMatthias Sohn2016-03-012-1/+2
| | | | | | | This fixes a MissingResourceException thrown when executing jgit debug-rebuild-ref-tree --help Change-Id: I637ea55084a913f5105ebf4cf2baef8b81877938 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Support Amazon S3 based storage for LFSMatthias Sohn2016-02-174-10/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a storage implementation storing large objects in Amazon S3. The AmazonS3Repository pre-signs download and upload requests. AWS access and secret key are expected to be in the $HOME/.aws/credentials file in the following format: [default] accessKey = ... secretKey = ... Use AWS version 4 request signing [1] because it is more secure and supported by all regions. The version 3 signing is not supported in newer regions. In follow up changes we should: - implement getVerifyAction() and do actual verification. Subclasses of S3Repository can implement caching for object meta data (size) in order to avoid extra roundtrips to S3. Verification should ensure that meta data store and content of S3 storage are in sync - HEAD request used in S3Repository.getSize() seems to always return Content-length 0 in contrast to the documentation [2]. So getSize() does detect if the object exists in S3 or not but in case the object exists it always returns size 0 [1] http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html [2] https://forums.aws.amazon.com/thread.jspa?threadID=223616 Change-Id: Ic47f094928a259e5264c92b3aacf6d90210907a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Merge branch 'stable-4.2'Matthias Sohn2016-02-152-13/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.2: Don't use deprecated LockFile constructor Fix warnings about unchecked conversion of MergeResult MockServletConfig: Fix warning about unchecked conversion of Enumeration HugeFileTest: Make Git a class member and open in try-with-resource Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED DiffAlgorithms: Fix warnings about variable hiding DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r DirCacheIteratorTest: Open TreeWalk instances in try-with-resource ForPathTest: Open TreeWalk in try-with-resource GitConstructionTest: Open Git instance in try-with-resource IndexDiffTest: Open Git instances in try-with-resources ManifestParserTest: Don't use deprecated StringBufferInputStream InMemoryRepository: Remove unused RevWalk from batch method signature IndexModificationTimesTest: Open Git instances in try-with-resource InterIndexDiffFilterTest: Open TreeWalk in try-with-resource LockFileTest: Open Git instance in try-with-resource JGit v4.1.2.201602141800-r MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Don't use deprecated LockFile constructorDavid Pursehouse2016-02-151-2/+2
| | | | | | | | | | Change-Id: Ibc3e2f3372e1a65732dd6d3c71cec53fb1aa15e2 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
| * DiffAlgorithms: Fix warnings about variable hidingDavid Pursehouse2016-02-151-11/+12
| | | | | | | | | | | | | | | | Local variables/parameters named 'db' and 'cmp' were hiding class member variables of the same name. Change-Id: I98b770587aaf73744a93e6a3ee33d131a9fa91e9 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>