summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.0.2-SNAPSHOT buildsMatthias Sohn2018-06-222-14/+14
| | | | | Change-Id: I65e83f39a4082278c4cb809dbb08d44a119cebe0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.1.201806211838-rv5.0.1.201806211838-rMatthias Sohn2018-06-222-2/+2
| | | | | Change-Id: I594cd85d46698953c27da3687e4ec40aeb73b445 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.0.1-SNAPSHOT buildsMatthias Sohn2018-06-132-14/+14
| | | | | Change-Id: Iadf12dbdd63ef17c3f712c0fc18495304aa35016 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201806131550-rv5.0.0.201806131550-rMatthias Sohn2018-06-132-2/+2
| | | | | Change-Id: Ia2d548676217250593c3f0c383aec19e12e5e4a4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201806131210-rMatthias Sohn2018-06-132-2/+2
| | | | | Change-Id: Iedccfcaf57c11822f1faf5d5195357de42b2a14e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-06-052-2/+2
| | | | | Change-Id: I9acca328146aa7100fbc1b457fcb1f8fd87cf52a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201806050710-rc3v5.0.0.201806050710-rc3Matthias Sohn2018-06-052-2/+2
| | | | | Change-Id: Ic7a6a87dd3a21351e60fbf6cd330456adf1f6800 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add protocol v2 support in httpJonathan Tan2018-06-042-3/+32
| | | | | | | | | | | Teach UploadPack to support protocol v2 with non-bidirectional pipes, and add support to the HTTP protocol for v2. This is only activated if the repository's config has "protocol.version" equal to 2. Change-Id: I093a14acd2c3850b8b98e14936a716958f35a848 Helped-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* Give info/refs services more control over responseJonathan Tan2018-06-041-3/+32
| | | | | | | | | | | | | | | | | | | | | | | Currently, SmartServiceInfoRefs always prints "# service=serviceName" followed by a flush packet in response to an info/refs request, and then hands it off to the specific service class. Printing of "# service=serviceName" is mandated for protocol v0, but not v2. Therefore, the existing code works for protocol v0, but whenever a service that supports protocol v2 receives an info/refs request, it must first determine which protocol version is to be used (depending on, for example, the request and any relevant configuration variables), and then decide if "# service=serviceName" needs to be printed. Create a new method that v2-supporting service classes can override, covering the printing of both "# service=serviceName" and everything that the #advertise method prints. This will be used in a subsequent commit in which UploadPackServlet (and the other classes it uses) is updated to support protocol v2. Change-Id: Ia026b06e96a6b15937514096babd024ef77df1ea Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-302-2/+2
| | | | | Change-Id: I9c4a0465f8e85041d24da97f4b4c7ad5f5eed3e4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201805301535-rc2v5.0.0.201805301535-rc2Matthias Sohn2018-05-302-2/+2
| | | | | Change-Id: Ifad678794525c01838b03e52bada66e1c089c5ae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-232-2/+2
| | | | | Change-Id: Ie343ccf37f46168041046500a2e19acc80814cfe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.0.201805221745-rc1v5.0.0.201805221745-rc1Matthias Sohn2018-05-222-2/+2
| | | | | Change-Id: Ie2c35fab87f294b00f9754b07b60a848bf256b10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* InfoRefsServlet: Refactor to not use deprecated methodsDavid Pursehouse2018-05-211-7/+1
| | | | | | | | | - Replace RefDatabase#getRefs(String) with #getRefsByPrefix(String) - Replace RefAdvertiser#send(Map<String, Ref>) with #send(Collection<Ref>) Bug: 534731 Change-Id: I25b617c3b0c54793cf4ab5b62f002e17745a5377 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove further unnecessary 'final' keywordsHan-Wen Nienhuys2018-05-1812-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove it from * package private functions. * try blocks * for loops this was done with the following python script: $ cat f.py import sys import re import os def replaceFinal(m): return m.group(1) + "(" + m.group(2).replace('final ', '') + ")" methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)") def subst(fn): input = open(fn) os.rename(fn, fn + "~") dest = open(fn, 'w') for l in input: l = methodDecl.sub(replaceFinal, l) dest.write(l) dest.close() for root, dirs, files in os.walk(".", topdown=False): for f in files: if not f.endswith('.java'): continue full = os.path.join(root, f) print full subst(full) Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* Remove 'final' in parameter listsHan-Wen Nienhuys2018-05-1513-18/+18
| | | | | Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* RepositoryFilter: Refactor doFilter to open Repository in try-with-resourceDavid Pursehouse2018-03-141-8/+3
| | | | | Change-Id: Ic4a056eebe567ff933519d6a805edb7e97c71b22 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-132-12/+3
| | | | | | | | | | | | | | | | | | | | When an auto-closeable resources is not opened in try-with-resource, the warning "should be managed by try-with-resource" is emitted by Eclipse. Fix the ones that can be silenced simply by moving the declaration of the variable into a try-with-resource. In cases where we explicitly call the close() method, for example in tests where we are testing specific behavior caused by the close(), suppress the warning. Leave the ones that will require more significant refcactoring to fix. They can be done in separate commits that can be reviewed and tested in isolation. Change-Id: I9682cd20fb15167d3c7f9027cecdc82bc50b83c4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-03-082-14/+14
| | | | | Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.11.1-SNAPSHOT buildsMatthias Sohn2018-03-082-14/+14
| | | | | Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.11.0.201803080745-rv4.11.0.201803080745-rMatthias Sohn2018-03-082-2/+2
| | | | | Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* InfoRefsServlet: Open OutputStreamWriter in try-with-resourceDavid Pursehouse2018-03-071-21/+22
| | | | | Change-Id: Iaf93d5c020ee67e9effbe93334f1ad419ffaee1f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* GitSmartHttpTools: Open OutputStream in try-with-resourceDavid Pursehouse2018-03-061-4/+1
| | | | | Change-Id: Ifb50b923f58f73d323cc1492950e58b6dc39f376 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* FileSender: Open OutputStream in try-with-resourceDavid Pursehouse2018-03-061-4/+1
| | | | | Change-Id: I2278950998dffc2b5730a91a5bb3bcc38f4d446b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable warning for resources not managed by try-with-resourceDavid Pursehouse2018-03-031-1/+1
| | | | | Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.11.0-SNAPSHOT buildsMatthias Sohn2017-12-312-14/+14
| | | | | Change-Id: I5d5e2befcf530d93457d44684bd9e4fc2392e5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add header Automatic-Module-Name for Java 9Karsten Thoms2017-12-231-0/+1
| | | | | | Bug: 529075 Change-Id: I4532ce2c80eb91531d46026676502d636ccda706 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit.http.serverMatthias Sohn2017-12-1731-64/+204
| | | | | Change-Id: I732d773b21bbf64285493070964dd9e442eab5d8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-4.9'Matthias Sohn2017-11-241-1/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore warning for minor version change without API change Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
| * Ignore warning for minor version change without API changeMatthias Sohn2017-11-241-1/+11
| | | | | | | | | | | | | | | | - this is a new warning option in Eclipse 4.7 and higher - we always change version of all bundles in a release to keep release engineering simple Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 4.9.1-SNAPSHOT buildsMatthias Sohn2017-10-082-14/+14
| | | | | | | | | | Change-Id: Ic49fd093d3fe4324c4d83aba74033040fcaa37a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v4.9.0.201710071750-rv4.9.0.201710071750-rMatthias Sohn2017-10-072-2/+2
| | | | | | | | | | Change-Id: I487f6aa3d0c4ef1d57f91cdc36177d994ae24c51 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 4.10.0-SNAPSHOT buildsMatthias Sohn2017-10-082-14/+14
|/ | | | | Change-Id: I5ca462d1db18a2c5c9382cfb9c83972510fa2b88 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Cleanup: Remove unnecessary $NON-NLS$ tagsMatthias Sohn2017-08-301-1/+1
| | | | Change-Id: I143c9d62b89322509123d4e06a221dd4dc158c55 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn2017-08-301-1/+1
| | | | | | | | Do not automatically organize imports using a save action since this seems to be buggy and removed some annotations org.eclipse.jgit.pgm needs to use args4j. Change-Id: I5a91292c3b9241ce2dde3e4ecce14ad460097129 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn2017-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | Revert the following save actions which were introduced in c0ad77d8: - always use braces around blocks - remove unused imports Other than I expected save actions are run globally on edited files - and not only on edited code lines only. Hence revert the save action "Convert control statement bodies to blocks" which would affect a large number of code lines not affected by the change editing some small part of a class. This would generate a large number of changes which may lead to many unnecessary conflicts. Total number of affected lines across jgit would be around 10k lines. Also revert "Remove unused imports" since it erroneously removes imports of some annotations needed by pgm classes using args4j. Change-Id: I879a47f68e664129e6124cf25c1ae1f6a2d7a5aa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enhance Eclipse save actionsMatthias Sohn2017-08-281-7/+12
| | | | | | | | | | | | | | | | | | | | | Add the following Eclipse save actions executed when saving modified lines. This should help to reduce manual work needed to maintain a clean and consistent code style: - organize imports - always use braces around blocks - add missing annotations - @Override including implementation of interface methods - @Deprecated - remove - unused imports - unnecessary $NON-NLS$ tags - redundant type arguments Also add default values for new settings that were introduced in recent Eclipse versions up to Neon since we updated save rules the last time. Change-Id: Idc90b249df044d0552f04edf01a5f607c4846f50 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Show error message for non-git clientsMasaya Suzuki2017-08-251-1/+1
| | | | | Change-Id: I56435d955348eb9acef6603d868f9add1c8781c9 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* Eliminate SectionParser construction boilerplateDave Borowitz2017-08-023-27/+3
| | | | | | | | | Happily, most anonymous SectionParser implementations can be replaced with FooConfig::new, as long as the constructor takes a single Config arg. Many of these, the non-public ones, can in turn be inlined. A few remaining SectionParsers can be lambdas. Change-Id: I3f563e752dfd2007dd3a48d6d313d20e2685943a
* Add missing newlines at ends of Java filesDavid Pursehouse2017-07-251-1/+1
| | | | | Change-Id: Iead36f53d57ead0eb3edd3f9efb63b6630c9c20c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.9.0-SNAPSHOT buildsMatthias Sohn2017-05-302-14/+14
| | | | | Change-Id: I52a4153d573799e861ab104939f51fac1aceb9ee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Bazel: Restrict src globs to Java source filesDavid Pursehouse2017-04-131-1/+1
| | | | | | | | | | | | | | | | Generating the src list with an unrestricted wildcard causes all files in the source tree to be included. This results in junk files such as .orig (generated during merge conflict resolution) to be included, which causes in a build error: in srcs attribute of java_library rule //org.eclipse.jgit:jgit: file '//org.eclipse.jgit:src/org/eclipse/jgit/gitrepo/RepoCommand.java.orig' is misplaced here (expected .java, .srcjar or .properties). Modify the globs to only include Java source files. Change-Id: Iaef3db33ac71d71047cd28acb0378e15cb09ece9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.8.0-SNAPSHOT buildsMatthias Sohn2017-04-052-14/+14
| | | | | Change-Id: Ifea6750e79d417a8a2a891b3b5f96d68c7200011 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove Buck buildDavid Pursehouse2017-03-221-10/+0
| | | | | | Buck will be replaced with Bazel Change-Id: I3cf07d7aaaa2a58bac34e16c50af5416693254ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* bazel: Add explicit targets for library dependenciesJonathan Nieder2017-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | This provides a place to declare visibility restrictions and transitive dependencies for each library. Other targets should only declare dependencies on what they directly use, making dependencies easier to maintain. Trim the dependencies of org.eclipse.jgit:jgit to follow that rule. It declares dependencies on Apache httpcomponents and the servlet API but doesn't use them. Tested: * 'bazel build //...' succeeds * applying the change https://gerrit-review.googlesource.com/90843 to a copy of Gerrit, following the instructions there, and running 'bazel test //...' in that copy of Gerrit still succeeds Change-Id: I3ab958ce8b3227019cdbe4cc81e0f042e1541034
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-204-6/+6
| | | | | | | | | | 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-1924-1/+63
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Format Bazel files with buildifierDavid Pursehouse2017-01-221-9/+10
| | | | | Change-Id: I934114315d2c7cab917f1011b8e55c52367d429f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Implement initial framework of Bazel buildDavid Ostrovsky2017-01-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial implementation only builds the packages consumed by Gerrit Code Review. Test build and execution is not implemented. We prefer to consume maven_jar custom rule from bazlets repository, for the same reasons as in the Gerrit project: * Caching artifacts across different clones and projects * Exposing source classifiers and neverlink artifact TEST PLAN: $ bazel build :all $ unzip -t bazel-genfiles/all.zip Archive: bazel-genfiles/all.zip testing: libjgit-archive.jar OK testing: libjgit-servlet.jar OK testing: libjgit.jar OK testing: libjunit.jar OK No errors detected in compressed data of bazel-genfiles/all.zip. Change-Id: Ia837ce95d9829fe2515f37b7a04a71a4598672a0 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.7.0-SNAPSHOT buildsMatthias Sohn2016-12-272-14/+14
| | | | | Change-Id: I20754d13007e6591d36aae5766f3a9a82b24e120 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>