summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-5.1' into stable-5.2David Pursehouse2019-03-056-12/+71
|\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Fix error log message in ObjectDirectory.handlePackError() Properly format pack checksums in PackFile.idx() Cancel gc if thread was interrupted PackFile: report correct message for checksum mismatch ObjectDirectory: Clean up logging Bazel: Stop using native.git_repository Change-Id: I42b72a3bba3b4c9389d91a1a35a8004836567e7c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Fix error log message in ObjectDirectory.handlePackError()Matthias Sohn2019-03-042-3/+3
| | | | | | | | Change-Id: I154f392ad025c4b642eb1123d375a0afaa853885 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Properly format pack checksums in PackFile.idx()Matthias Sohn2019-03-041-2/+3
| | | | | | | | Change-Id: Id805850dbe9a3d633168f3056e06ddeafd86f961 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Cancel gc if thread was interruptedMatthias Sohn2019-03-032-1/+53
| | | | | | | | | | | | | | see https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * PackFile: report correct message for checksum mismatchLuca Milanesio2019-03-032-6/+7
| | | | | | | | | | | | | | | | | | When the packfile checksum does not match the expected one report the correct checksum error instead of reporting that the number of objects is incorrect. Change-Id: I040f36dacc4152ae05453e7acbf8dfccceb46e0d Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * ObjectDirectory: Clean up loggingDavid Pursehouse2019-03-033-2/+7
| | | | | | | | | | | | | | Externalize the message and log the pack file with absolute path. Change-Id: I019052dfae8fd96ab67da08b3287d699287004cb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Bazel: Stop using native.git_repositoryDavid Pursehouse2019-03-031-1/+3
| | | | | | | | | | | | | | | | | | | | The native.git_repository method doesn't work in the latest version of bazel, and causes the build to fail with: type 'struct' has no method git_repository() Change-Id: Id6a57369b681c0afe811e9e3740b141fb7fb4653 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge branch 'stable-5.1' into stable-5.2David Pursehouse2019-02-181-0/+2
|\| | | | | | | | | | | | | * stable-5.1: ObjectDirectory: extra logging on packfile exceptions Change-Id: Id2fea30664d53b31ad026ee5ae06a5a24d731a52
| * ObjectDirectory: extra logging on packfile exceptionsLuca Milanesio2019-02-141-0/+2
| | | | | | | | | | | | | | | | | | Display extra logging, including the exception with the associated stacktrace, whenever a packFile can't be read and thus removed from the packlist. Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
* | Prepare 5.2.2-SNAPSHOT buildsMatthias Sohn2018-12-2767-407/+407
| | | | | | | | | | Change-Id: I9487f6a59ed684ad13bcfbff7d6c730ae4f37030 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | JGit v5.2.1.201812262042-rv5.2.1.201812262042-rMatthias Sohn2018-12-2767-71/+71
| | | | | | | | | | Change-Id: Idfefc54e898f364407a931b787a26db2489b031c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2018-12-270-0/+0
|\| | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.6-SNAPSHOT builds JGit v5.1.5.201812261915-r Change-Id: Idab456457200ec46f0e4e22bc6e54401b5b57285 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.1.6-SNAPSHOT buildsMatthias Sohn2018-12-2757-358/+358
| | | | | | | | | | Change-Id: If3313d602aa57cfa031ba2c9ec03bd51b464dc19 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.1.5.201812261915-rv5.1.5.201812261915-rMatthias Sohn2018-12-2756-59/+59
| | | | | | | | | | Change-Id: I249a440d1ca1c997343da942ae55fcb27a645b92 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | UploadPack: Filter refs used for deepen-not resolutionJonathan Nieder2018-12-261-1/+34
| | | | | | | | | | | | | | | | | | | | Clients can use --shallow-exclude to obtain information about what commits are reachable from refs they are not supposed to be able to see. Plug the hole by allowing the AdvertiseRefsHook and RefFilter to take effect here, too. Change-Id: If2b8e95344fa49e10a6a202144318b60d002490e Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Merge branch 'stable-5.1' into stable-5.2Jonathan Nieder2018-12-2610-106/+249
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: UploadPack: Avoid calling AdvertiseRefsHook twice Prepare 5.1.5-SNAPSHOT builds JGit v5.1.4.201812251853-r UploadPack: Filter refs used for want-ref resolution UploadPack: Defer want-ref resolution to after parsing Call AdvertiseRefsHook for protocol v2 Prepare 4.11.7-SNAPSHOT builds JGit v4.11.6.201812241910-r Prepare 4.9.9-SNAPSHOT builds JGit v4.9.8.201812241815-r UploadPack: Test filtering by AdvertiseRefsHook in stateless transports Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I5879df9b723a0dbf6a1eff89a34bbb269f3b773d Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Merge branch 'stable-5.0' into stable-5.1Jonathan Nieder2018-12-261-2/+4
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-5.0: UploadPack: Avoid calling AdvertiseRefsHook twice Change-Id: Ie9ce67921e38fff8338a148c4d9f2776be01d0b0 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * UploadPack: Avoid calling AdvertiseRefsHook twiceJonathan Nieder2018-12-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AdvertiseRefsHook can be called twice if the following conditions hold: 1. This AdvertiseRefsHook doesn't set this.refs. 2. getAdvertisedOrDefaultRefs is called after getFilteredRefs. For example, this can happen when fetchV2 is called after lsRefsV2 when using a stateful bidirectional transport. The second call does not accomplish anything useful. Guard it with 'if (!advertiseRefsHookCalled)' to avoid wasted work. Reported-by: Jonathan Tan <jonathantanmy@google.com> Change-Id: Ib746582e4ef645b767a5b3fb969596df99ac2ab5 Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | Prepare 5.1.5-SNAPSHOT buildsMatthias Sohn2018-12-2657-358/+358
| | | | | | | | | | | | | | | Change-Id: I3eeb24b01a4f955e7e933238defb42635ebfec7d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.1.4.201812251853-rv5.1.4.201812251853-rMatthias Sohn2018-12-2657-60/+74
| | | | | | | | | | | | | | | Change-Id: I30ba167bcd8144074553d7446a45fa6be19584fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | UploadPack: Filter refs used for want-ref resolutionJonathan Nieder2018-12-262-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the longer term, we can add support for this to the RequestValidator interface. In the short term, this is a minimal band-aid to ensure any refs the client requests are visible to the client. Change-Id: I0683c7a00e707cf97eef6c6bb782671d0a550ffe Reported-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | UploadPack: Defer want-ref resolution to after parsingJonathan Nieder2018-12-264-77/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProtocolV2Parser explains: // TODO(ifrade): This validation should be done after the // protocol parsing. It is not a protocol problem asking for an // unexisting ref and we wouldn't need the ref database here. Do so. This way all ref database accesses are in one place, in the UploadPack class. No user-visible change intended --- this is just to make the code easier to manipulate. Change-Id: I68e87dff7b9a63ccc169bd0836e8e8baaf5d1048 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-5.0' into stable-5.1Matthias Sohn2018-12-254-33/+146
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Call AdvertiseRefsHook for protocol v2 Prepare 4.11.7-SNAPSHOT builds JGit v4.11.6.201812241910-r Prepare 4.9.9-SNAPSHOT builds JGit v4.9.8.201812241815-r UploadPack: Test filtering by AdvertiseRefsHook in stateless transports Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: Icdc212bf5be2485d0f8028acf6c62fb8531d0e3c Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Call AdvertiseRefsHook for protocol v2Masaya Suzuki2018-12-251-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AdvertiseRefsHook is used to limit the visibility of the refs in Gerrit. If this hook is not called, then all refs are treated as visible. In protocol v2, the hook is not called, causing the server to advertise all refs. This bug was introduced in v5.0.0.201805221745-rc1~1^2~9 (Execute AdvertiseRefsHook only for protocol v0 and v1, 2018-05-14). Even before then, the hook was not called in requests after the capability advertisement, so in transports like HTTP that do not retain state between round-trips, the server would advertise all refs in response to an ls-refs (ls-remote) request. Fix both cases by using getAdvertisedOrDefaultRefs to retrieve the advertised refs in lsRefs, ensuring the hook is called in all cases that use its result. [jn: backported to stable-5.0; split out from a larger patch that also fixes protocol v0; avoided filtering this.refs by ref prefix] Change-Id: I64bce0e72d15b90baccc235c067e57b6af21b55f Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2018-12-254-19/+100
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Prepare 4.11.7-SNAPSHOT builds JGit v4.11.6.201812241910-r Prepare 4.9.9-SNAPSHOT builds JGit v4.9.8.201812241815-r UploadPack: Test filtering by AdvertiseRefsHook in stateless transports Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: Ie81284ca6d580b0712c49eec610393d0c0c50203 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Prepare 4.11.7-SNAPSHOT buildsMatthias Sohn2018-12-2557-363/+357
| | | | | | | | | | | | | | | | | | | | Change-Id: I97dc0f4aeb51c2084f40531ceac84e90bf70608d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * JGit v4.11.6.201812241910-rv4.11.6.201812241910-rMatthias Sohn2018-12-2556-59/+59
| | | | | | | | | | | | | | | | | | | | Change-Id: I21bfe7a76450184bce43cbe8ebcaa7891e4b12ed Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-12-255-16/+109
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Prepare 4.9.9-SNAPSHOT builds JGit v4.9.8.201812241815-r UploadPack: Test filtering by AdvertiseRefsHook in stateless transports Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I937e9a4547fc10e4de7c887163022d1ab0322d64 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-12-254-16/+103
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Prepare 4.9.9-SNAPSHOT builds JGit v4.9.8.201812241815-r UploadPack: Test filtering by AdvertiseRefsHook in stateless transports Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I2e499f34b1c481af794fa9325b0dfebaccdf3cb0 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Prepare 4.9.9-SNAPSHOT buildsMatthias Sohn2018-12-2556-333/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0f7238ce8f79063a410c85701020ffce2b1234cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v4.9.8.201812241815-rv4.9.8.201812241815-rMatthias Sohn2018-12-2556-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic75e4611cce396b186680bc962f0c73b2ee5fff1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * UploadPack: Test filtering by AdvertiseRefsHook in stateless transportsMasaya Suzuki2018-12-243-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AdvertiseRefsHook is used to limit the visibility of the refs in Gerrit. If this hook is not called, then all refs are treated as visible, causing the server to serve commits reachable from branches the client should not be able to access, if asked to via a request naming a guessed object id. Until 3a529361a76e8267467071e0b13ebb36b97d8fb2 (Call AdvertiseRefsHook before validating wants, 2018-12-18), UploadPack would invoke this hook at ref advertisement time but not during negotiation and when serving a pack file. Add a test to avoid regressing. Stateful bidirectional transports were not affected, so the test uses HTTP. [jn: split out when backporting the fix to stable-4.5. The test passes as long as v4.9.0.201710071750-r~169 (fetch: Accept any SHA-1 on lhs of refspec, 2017-06-04) is cherry picked along with it.] Change-Id: I8c017107336adc7cb4c826985779676bf043e648 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2018-12-242-14/+10
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: Ib44e314a68bca2349b45f4937257aa1298c8d74b Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2018-12-241-13/+9
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Prepare 4.7.8-SNAPSHOT builds JGit v4.7.7.201812240805-r Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I68a21067705b580b40840f8039001ff1e5273c15 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Prepare 4.7.8-SNAPSHOT buildsMatthias Sohn2018-12-2457-324/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic4ab4aae6d87392d1a5a8bbda06384b7a5b64182 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * JGit v4.7.7.201812240805-rv4.7.7.201812240805-rMatthias Sohn2018-12-2456-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I57b6001b1fbd6042299ccd4dd7d70765a46ea10b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2018-12-242-15/+11
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Fix feature versions imported by feature org.eclipse.jgit.pgm Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: If637694f80dbd1e774d60c672fe78a6500650bb8 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | * Fix feature versions imported by feature org.eclipse.jgit.pgmMatthias Sohn2018-12-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On stable-4.6 we are currently at version 4.6.2-SNAPSHOT Change-Id: Ia2972d0697c3476850ecf4a3c6691b3987866cd9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2018-12-241-13/+9
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.5.6-SNAPSHOT builds JGit v4.5.5.201812240535-r Call AdvertiseRefsHook before validating wants Change-Id: I0fd67ddd9c4966c20d82cdfe78b2f9d4898b4665 Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Prepare 4.5.6-SNAPSHOT buildsMatthias Sohn2018-12-2456-302/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I57c55187ada6d824b94a17f5a79a5bcff61f9ee9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * JGit v4.5.5.201812240535-rv4.5.5.201812240535-rMatthias Sohn2018-12-2456-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6e89e937c08757887967d91afb39cfbe8372d6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Call AdvertiseRefsHook before validating wantsMasaya Suzuki2018-12-241-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AdvertiseRefsHook is used to limit the visibility of the refs in Gerrit. If this hook is not called, then all refs are treated as visible, causing the server to serve commits reachable from branches the client should not be able to access, if asked to via a request naming a guessed object id. This bug was introduced in v2.0.0.201206130900-r~123 (Modify refs in UploadPack/ReceivePack using a hook interface, 2012-02-08). Stateful bidirectional transports are not affected. Fix it by moving the AdvertiseRefsHook call to getAdvertisedOrDefaultRefs, ensuring the hook is called in all cases. [jn: backported to stable-4.5 by splitting out tests and the protocol v2 specific parts] Change-Id: I159f396216354f2eda3968d17802e166d8c8ec2d Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Merge branch 'stable-5.1' into stable-5.2David Pursehouse2018-12-204-3/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: BasePackConnection: Check for expected length of ref advertisement TransferConfig: Make constructors public Change-Id: I2480a0455250ee381fae93cac2db30f8305fa6aa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | | | | | | BasePackConnection: Check for expected length of ref advertisementDavid Pursehouse2018-12-203-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a server sends a ref advertisement using protocol v2 it contains lines other than ref names and sha1s. Attempting to get the sha1 out of such a line using the substring method can result in a SIOOB error when it doesn't actually contain the sha1 and ref name. Add a check that the line is of the expected length, and subsequently that the extracted object id is valid, and if not throw an exception. Change-Id: Id92fe66ff8b6deb2cf987d81929f8d0602c399f4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | | | | | | TransferConfig: Make constructors publicDavid Pursehouse2018-12-201-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UploadPack has a setTransferConfig method which allows to set the transfer config, however since the constructors of TransferConfig have the default package visibility it is not possible for any application using UploadPack, for example Gerrit, to actually set a transfer config. Make the constructors public. This is consistent with the public constructors for example on PackConfig. Change-Id: I07080255838421871403b2b2bcc294aa8f621c57 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | | Update last JGit versionThomas Wolf2018-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The jgit-last-release-version is used by japicmp as baseline. Change-Id: If56cc1785b61c92c9a05c8c29c6cb62001e89218 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | | | Update list of committersMatthias Sohn2018-12-091-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5bd3dc06103f8f62af1485b92e7b89f8a725be28 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Add new ssh bundles to Maven central scriptsMatthias Sohn2018-12-092-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5c41426f59a60af3da808f89be4e498c7ba2196e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Update maven site reportsMatthias Sohn2018-12-091-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update name of reports which changed name in maven-project-info-reports-plugin 3.0.0 - add dependency-covergence report - add dependency-management report - add index report - add summary report Change-Id: I6d406ecd9e082d96b2bd250704d5ca18e7c8f735 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Prepare 5.2.1-SNAPSHOT buildsMatthias Sohn2018-12-0767-407/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I68d9f5b1c8ca8e8eada9143093dc4fa82519edd8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>