summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server
Commit message (Collapse)AuthorAgeFilesLines
* JGit v5.2.2.201904231744-rv5.2.2.201904231744-rMatthias Sohn2019-04-232-2/+2
| | | | | Change-Id: I4ed2aff28bff702a8c1b42814acb04c7ef9025a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.2.2-SNAPSHOT buildsMatthias Sohn2018-12-272-15/+15
| | | | | Change-Id: I9487f6a59ed684ad13bcfbff7d6c730ae4f37030 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.2.1.201812262042-rv5.2.1.201812262042-rMatthias Sohn2018-12-272-2/+2
| | | | | Change-Id: Idfefc54e898f364407a931b787a26db2489b031c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.2.1-SNAPSHOT buildsMatthias Sohn2018-12-072-15/+15
| | | | | Change-Id: I68d9f5b1c8ca8e8eada9143093dc4fa82519edd8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.2.0.201812061821-rv5.2.0.201812061821-rMatthias Sohn2018-12-072-2/+2
| | | | | Change-Id: I8528c913ad1a820ee9a2fa6be1c9125b518caefe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.2.0-SNAPSHOT buildsMatthias Sohn2018-11-302-2/+2
| | | | | Change-Id: I18646aaeee51047b234b758dcc1c2f89fd01b2f8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.2.0.201811281532-m3v5.2.0.201811281532-m3Matthias Sohn2018-11-282-2/+2
| | | | | Change-Id: I79988b473d67e565d8f6bcac40ee9a14b26c9e60 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unnecessary modifiers from interfacesJonathan Nieder2018-11-201-2/+2
| | | | | | | This continues what commit d9ac7ddf1026123fee6c4477d172d614522dfc08 (Remove unnecessary modifiers from interfaces, 2018-11-15) started. Change-Id: I89720985a5a986722a0dcb9b5e9bbc25996bd5b3
* Revert C Git 1.7.5 bug workaroundMasaya Suzuki2018-11-193-38/+6
| | | | | | | | | | This reverts the workaround introduced by 1c6c73c5a9b8dd700be45d658f165a464265dba7, which is a patch for dealing with a buggy C Git client v1.7.5 in 2012. We'll stop supporting very old C Git clients. Change-Id: I94999a39101c96f210b5eca3c2f620c15eb1ac1b Signed-off-by: Masaya Suzuki <masayasuzuki@google.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>
* Move first line parsing for v0/v1 pack negotiation out of UploadPackIvan Frade2018-10-122-3/+5
| | | | | | | | | | | | | | | In protocol v0/v1 pack negotiation, the first want line contains the options the client wants in effect. This parsing is done in UploadPack but it doesn't have any interaction with that class. Move the code to its own class and package, mark the current one as deprecated (it is public API) and add unit tests. Take the chance to move the parsing code from the constructor to a factory method, making the class a simple container of results. Change-Id: I1757f535dda78a4111a1c12c3a3b455a4b6f0c51 Signed-off-by: Ivan Frade <ifrade@google.com>
* Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8David Pursehouse2018-09-302-3/+4
| | | | | Change-Id: I621ba174235a6fb56236e54d24bce704bb5afb28 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix Mylyn commit message templateMichael Keppler2018-09-231-1/+1
| | | | | | | | The commit message template contains a superfluous blank at the end of the first line, which is deleted by this change. This is only relevant for jgit contributors using Eclipse, not for jgit users. Change-Id: I462deb49c26fb64b3dc2d1d75f1e40ef302b0fc9 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* SmartOutputStream: Suppress false-positive resource leak warningDavid Pursehouse2018-09-151-0/+1
| | | | | Change-Id: I013841ed2584f061c680a8adf0f777dcae3c5418 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 5.2.0-SNAPSHOT buildsMatthias Sohn2018-09-062-14/+14
| | | | | Change-Id: If8e8ca20e745901a5e0239c16cb4acc7934b4ec8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8David Pursehouse2018-09-041-1/+2
| | | | | Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* refactor: simplify collection.toArray()Michael Keppler2018-08-232-2/+2
| | | | | | | | | | | On recent VMs, collection.toArray(new T[0]) is faster than collection.toArray(new T[collection.size()]). Since it is also more readable, it should now be the preferred way of collection to array conversion. https://shipilev.net/blog/2016/arrays-wisdom-ancients/ Change-Id: I80388532fb4b2b0663ee1fe8baa94f5df55c8442 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* Merge branch 'stable-5.0'Jonathan Nieder2018-06-043-6/+64
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Teach UploadPack "filter" in protocol v2 fetch Refactor test of capabilities output Refactor v2 advertisement into own function Refactor parsing of "filter" into its own method Disallow unknown args to "fetch" in protocol v2 Teach UploadPack shallow fetch in protocol v2 Refactor unshallowCommits to local variable Add protocol v2 support in http Give info/refs services more control over response Change-Id: I1683902222e076e1091795e94790a264550afb7b Signed-off-by: Jonathan Nieder <jrn@google.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>
* | Prepare 5.1.0-SNAPSHOT buildsMatthias Sohn2018-05-232-14/+14
|/ | | | | Change-Id: I8523a993ae1f7b62573d7547273bc1356bf64fa7 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>