aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [releng] bazel: Enable errorprone on o.e.j.ssh.apacheThomas Wolf2021-11-037-9/+28
| | | | | | Fix the few issues reported. (None serious.) Change-Id: I8d72ef7d425ab61f4c27b657c92fc021850730d6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* [releng] Make the bazel build use Java 11Thomas Wolf2021-11-033-4/+26
| | | | | | | Make the default toolchain use Java 11, and fix two errorprone findings introduced recently. Change-Id: Iff51206fe8bdf096cb7d88cb1a499002550766cd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Merge branch 'stable-5.13'Matthias Sohn2021-11-037-13/+13
|\ | | | | | | | | | | | | * stable-5.13: Fix target platforms Change-Id: Iabbbacd6acde07a2e0ff156842b928a3ba18b4c6
| * Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2021-11-0318-35/+35
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: Fix target platforms - jetty 9.4.43 moved to archive.eclipse.org - use the final release p2 repo instead of staging for 2021-09 Change-Id: I35c1264b8e9c63874663141288dca03b47f263ed
| | * Merge branch 'stable-5.11' into stable-5.12Matthias Sohn2021-11-0318-40/+40
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.11: Fix target platforms - jetty 9.4.41 moved to archive.eclipse.org - use the final release p2 repo instead of staging for 2021-06 Change-Id: I7a02b1fe271910dd82acf45242d8425aba2f52f9
| | | * Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2021-11-0317-38/+38
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Fix target platforms - jetty 9.4.36 moved to archive.eclipse.org - use the final release p2 repo instead of staging for 2021-03 Change-Id: I6ce2294bb150fedf8ded7fe6c1e23019d9c178d6
| | | | * Merge branch 'stable-5.9' into stable-5.10Matthias Sohn2021-11-0315-36/+36
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Fix target platforms Change-Id: Ib1876923ba98252682f41a03877792fd22b418d6
| | | | | * Fix target platformsMatthias Sohn2021-11-0314-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - jetty 9.4.30 moved to archive.eclipse.org - use the final release p2 repo instead of staging for 2020-09 Change-Id: Ia096200e5983f0022c6c0da4dae035433e852807
* | | | | | [doc] Add README and package-info to the SSH bundlesThomas Wolf2021-10-314-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explain in the JSch bundle that it is essentially unmaintained. Add descriptions in both bundles explaining how to use it, or how to use an alternate implementation. Change-Id: Idaf46c33b14543279f78a55cb7c6bd42b06ee6b8 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Binary and CR-LF detection: lone CRs -> binaryThomas Wolf2021-10-3113-100/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C git considers not only files containing NUL bytes as binary but also files containing lone CRs. Implement this also for JGit. C git additionally counts printable vs. non-printable characters and considers files that have non_printable_count > printable_count / 128 also as binary. This is not implemented because such counting probably only makes sense if one looks at the full file or blob content. The Auto[CR]LF* streams in JGit look only at the first few KiB of a stream in order not to buffer too much. For the C git implementation, see [1]. [1] https://github.com/git/git/blob/7e27bd589d/convert.c#L35 Bug: 576971 Change-Id: Ia169b59bdbf1477f32ee2014eeb8406f81d4b1ab Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Factor out parsing git-style size numbers to StringUtilsThomas Wolf2021-10-306-38/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code to parse numbers with an optional 'k', 'm', or 'g' suffix from the config file handling to StringUtils. This enables me to re-use it in EGit, which has duplicate code in StorageSizeFieldEditor. As this is generally useful functionality, providing it in the library makes sense. Change-Id: I86e4f5f62e14f99b35726b198ba3bbf1669418d9 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Make the buffer size for text/binary detection configurableThomas Wolf2021-10-309-46/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various streams used in JGit for text/binary and CR-LF detection used different buffer sizes. Most used 8000, but one used 8KiB, and one used 8096 (SIC!) bytes. Considering only the first 8kB of a file/blob is not sufficient; it may give behavior incompatible with C git. C git considers the whole blob; since it uses memory-mapped files it can do so with acceptable performance. Doing this in JGit would most likely incur a noticeable performance penalty. But 8kB is a bit small; in the file in bug 576971 the limit was hit before the first CR-LF, which occurred on line 155 at offset 9759 in the file. Make RawText.FIRST_FEW_BYTES only a default and minimum setting, and set it to 8KiB. Make the actual buffer size configurable: provide static methods getBufferSize() and setBuffersize(), and use getBufferSize() throughout instead of the constant. This enables users of the JGit library to set their own possibly larger buffer size. Bug: 576971 Change-Id: I447762c9a5147a521f73d2864ba59ed89f555d54 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Merge branch 'stable-6.0'Matthias Sohn2021-10-280-0/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Prepare 6.0.0-SNAPSHOT builds JGit v6.0.0.202110270955-m2 Prepare 6.0.0-SNAPSHOT builds JGit v6.0.0.202110060947-m1 Change-Id: I3c0f760ce13b6afbfb06ebd569ce0162b531d67d
| * | | | | | Prepare 6.0.0-SNAPSHOT buildsMatthias Sohn2021-10-2888-121/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iff7b4f834ecb43c7a0a9bf79bb8b30dd10d1fa07
| * | | | | | JGit v6.0.0.202110270955-m2v6.0.0.202110270955-m2Matthias Sohn2021-10-2788-121/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8057bbbf6acd478ad062e30cf5cbfc287531a66a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Merge branch 'master' into stable-6.0Matthias Sohn2021-10-2741-222/+747
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Fix checkout of files with mixed line endings on text=auto eol=crlf Don't rely on an implicit default character set Fix bad indentation in pom.xml Minor code-clean-up in OpenSshConfigFile Remove use of deprecated getAllRefs() in UploadPack DFS block cache: fix lock issue and support parallel index loading JSch: fix service publication for ServiceLoader Set JSch global config values only if not set already Fix missing peel-part in lsRefsV2 for loose annotated tags DFS block cache: allow multiple passes for blocks before eviction Fix RevWalk.getMergedInto() ignores annotated tags Optimize RevWalk.getMergedInto() GarbageCollectCommand: add numberOfBitmaps to statistics reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Add org.bouncycastle.bcutil to p2 repository Change-Id: Icaa36ded0439853a05ce21de9282e69d87a32284
* | | | | | | Fix checkout of files with mixed line endings on text=auto eol=crlfThomas Wolf2021-10-274-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for files having been checked in with mixed LF and CR-LF line endings, and then being checked out with text or text=auto and eol=lf or eol=crlf. These test cases were missing, and thus commit efd1cc05 missed that AutoCRLFOutputStream needs the same detection as AutoLFOutputStream. Fix AutoCRLFOutputStream to not convert line endings if the blob in the repository contains CR-LF. Bug: 575393 Change-Id: Id0c7ae772e282097e95fddcd3f1f9d82aae31e43 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Don't rely on an implicit default character setThomas Wolf2021-10-269-17/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JEP 400 (Java 18) will change the default character set to UTF-8 unconditionally.[1] Introduce SystemReader.getDefaultCharset() that provides the locale-dependent charset the way JEP 400 recommends. Change all code locations using Charset.defaultCharset() to use the new SystemReader method instead. [1] https://openjdk.java.net/jeps/400 Change-Id: I986f97a410d2fc70748b6f93228a2d45ff100b2c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Fix bad indentation in pom.xmlThomas Wolf2021-10-242-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I683f190d6914fb48f32cc3b3f0910b4264c7d725 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Minor code-clean-up in OpenSshConfigFileThomas Wolf2021-10-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I45d50198e43aeb2a56c74026de7ee8c1a30f9d10 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Remove use of deprecated getAllRefs() in UploadPackMatthias Sohn2021-10-231-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository.getAllRefs() is deprecated and should not be used anymore. Bug: 534731 Change-Id: I037a9b901275bfa7952b4c79861d7639c9d42715
* | | | | | | DFS block cache: fix lock issue and support parallel index loadingAlina Djamankulova2021-10-194-119/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is a fix to http://git.eclipse.org/r/c/jgit/jgit/+/183562 that was reverted in http://git.eclipse.org/r/c/jgit/jgit/+/184978 due to deadlocks. Separate locks in DfsBlockFile are removed to rely on getting value from DfsBlockCache with region locking in place. With this change bitmap index creation is not blocked on index and reverse index full initialization in DfsPackFile. Now bitmap index and index could be read from storage in parallel in separate threads. A unit test is added for parallel index loading. Signed-off-by: Alina Djamankulova <adjama@google.com> Change-Id: Ic6d9c5a4a254628636aa98a5008447a27a003f69
* | | | | | | Merge changes I1f180d7f,I04415f07Thomas Wolf2021-10-193-2/+39
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: JSch: fix service publication for ServiceLoader Set JSch global config values only if not set already
| * | | | | | | JSch: fix service publication for ServiceLoaderThomas Wolf2021-10-192-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file name in META-INF/services must be the fully qualified interface name; the content the fully qualified implementation class name. This was broken in commit 9683bc71. Add a test for the default factory being found by the ServiceLoader. Change-Id: I1f180d7f60e5c1e74a39bbd9a5f0099bd8343e21 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | Set JSch global config values only if not set alreadyThomas Wolf2021-10-191-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 576604 Change-Id: I04415f07bf2023bc8435c097d1d3c65221d563f1 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | Merge branch 'stable-5.13'Matthias Sohn2021-10-1513-41/+214
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | / / / / / | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Fix missing peel-part in lsRefsV2 for loose annotated tags Fix RevWalk.getMergedInto() ignores annotated tags Optimize RevWalk.getMergedInto() reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Add org.bouncycastle.bcutil to p2 repository Change-Id: I789e3c84045cc9dcd8a26de34d09fc1e3ccc41e7
| * | | | | | Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2021-10-1513-41/+208
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: Fix missing peel-part in lsRefsV2 for loose annotated tags Fix RevWalk.getMergedInto() ignores annotated tags Optimize RevWalk.getMergedInto() reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: Ie5da8d2d07f39ab5aaeca560040637635d4eb04c
| | * | | | | Merge branch 'stable-5.11' into stable-5.12Matthias Sohn2021-10-1510-35/+163
| | |\ \ \ \ \ | | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.11: Fix missing peel-part in lsRefsV2 for loose annotated tags reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I2122b3966bddb10d43d439eb8c5d6cc4583c6ba6
| | | * | | | Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2021-10-1510-35/+163
| | | |\ \ \ \ | | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Fix missing peel-part in lsRefsV2 for loose annotated tags reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I23ccb89306263ce042ce782d881812d4b5187672
| | | | * | | Merge branch 'stable-5.9' into stable-5.10Matthias Sohn2021-10-1510-35/+163
| | | | |\ \ \ | | | | | | |/ | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Fix missing peel-part in lsRefsV2 for loose annotated tags reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Fix running benchmarks from bazel Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I4e7c7727ebfa9a7748477f2300bd66d775548ad6
| | | | | * | Fix missing peel-part in lsRefsV2 for loose annotated tagsSaša Živkov2021-10-152-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We observed the following issue: $ git tag -a v1.0 -m v1.0 $ git push origin tag v1.0 $ git ls-remote origin v1.0^{} ... empty result ... On the server (Gerrit) side run git-gc to pack the refs: $ git gc Repeat the ls-remote from the client and the result is correct: $ git ls-remote origin v1.0^{} 7ad85c810de3ae922903d4bdd17c53cd627260ba refs/tags/v1.0^{} Unfortunately, the existing UploadPackTest didn't reveal this issue although it provided the test case needed to do so: testV2LsRefsPeel. This is because The UploadPackTest uses InMemoryRepository which internally uses Dfs* implementations. The issue is only reproducible when using the FileRepository. It is a non-trivial task to refactor the UploadPackTest to work against both InMemoryRepository and FileRepository and this change is not trying to do that. This change creates a new test: UploadPackLsRefsFileRepositoryTest and copies the necesssary code from the UploadPackTest. Change-Id: Icfc7d0ca63f1524bafe24c9626ce12ea72aa3718 Signed-off-by: Saša Živkov <sasa.zivkov@sap.com>
| | | | | * | Merge branch 'stable-5.8' into stable-5.9Matthias Sohn2021-10-085-33/+35
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.8: reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I9e66ef90dc9a65bac47b35705d679bf992bd72b9
| | | | | | * \ Merge branch 'stable-5.7' into stable-5.8Matthias Sohn2021-10-087-35/+37
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.7: reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I88c47ff57f4829baec5b19aad3d8d6bd21f31a86
| | | | | | | * \ Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2021-10-087-35/+37
| | | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: reftable: drop code for truncated reads reftable: pass on invalid object ID in conversion Update eclipse-jarsigner-plugin to 1.3.2 Change-Id: I1c18f5f435f4a4a86e0548a310dbfc74191e1ed5
| | | | | | | | * | reftable: drop code for truncated readsHan-Wen Nienhuys2021-09-283-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reftable format is a block based format, but allows for variably sized blocks. This obviously happens for reflog blocks (which are zlib compressed), but is also accepted for index blocks: In the spec, this is motivated as To achieve constant O(1) disk seeks for lookups the index must be a single level, which is permitted to exceed the file's configured block size, but not the format's max block size of 15.99 MiB. Hence, when parsing a block, one cannot be sure of its exact size: after reading a default-size block (eg. 4kb), the block header may state that the block is in fact larger. Before, the code would mark the block as `truncated`, noting // Its OK during sequential scan for an index block to have been // partially read and be truncated in-memory. This happens when // the index block is larger than the file's blockSize. Caller // will break out of its scan loop once it sees the blockType. This looks like either * a remnant of never-implemented functionality. There is no reason to ever sequentially scan an index block. * alluding to sequential scan of the data blocks before the index blocks (eg. scanning refs, which ends when we find the first ref index block, and we can then ignore the index block). This comment is followed by code that populates the restartTbl/restartCnt fields relative to the (possibly truncated) buffer. If the buffer is truncated, this essentially reads garbage, leading to OOB array access when using the index block. Fix this by dropping the truncated logic and issuing a second read if the first read was short. Add a test. We have never observed this failure scenario at Google. We use 64kb blocksize, which requires us to need fewer index entries. The reftable spec mentions an Android repo of size 36M. With 64kb blocks, that's just 562 index entries. Even with historical growth, we are long from requiring an index whose size exceeds a single block. When adding the analogous test for seeking refs, there was no failure. This points to another possibility which is that the code tries to avoid writing large index blocks for refs. I did not investigate further which one it is. Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=576250 Bug: 576250 Change-Id: I41ec21fac9e526ef57b3d6fb57b988bd353ee338 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
| | | | | | | | * | reftable: pass on invalid object ID in conversionHan-Wen Nienhuys2021-09-272-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, while trying to determine if an object ID was a tag or not, the reftable conversion would yield an exception. Change-Id: I3688a0ffa9e774ba27f320e3840ff8cada21ecf0
| | | | | | | | * | Update eclipse-jarsigner-plugin to 1.3.2Matthias Sohn2021-09-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id5d05d96c392913de7b4451421c2ffb7b63ab83f (cherry picked from commit c70c0acb4752f00672e3b856539587e4977bfaea)
| | | | | * | | | | Fix running benchmarks from bazelMatthias Sohn2021-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add missing dependency to - javaewah - slf4j-api Change-Id: I28dc982791b32f10d20b2fd0671aa8d2514a0fb3
| | | | | * | | | | Update eclipse-jarsigner-plugin to 1.3.2Matthias Sohn2021-09-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id5d05d96c392913de7b4451421c2ffb7b63ab83f
| | * | | | | | | | Fix RevWalk.getMergedInto() ignores annotated tagskylezhao2021-10-082-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an annotated tag refers to a commit, we should not ignore it. Change-Id: I77504f93636e9e984540e7d8535ef301adce6a80 Signed-off-by: kylezhao <kylezhao@tencent.com>
| | * | | | | | | | Optimize RevWalk.getMergedInto()kylezhao2021-10-082-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transitive Relation Definition: On the DAG of commit history, if A can reach B, C can reach A, then C can reach B. Example: As is shown in the graph below: 1 - 2 - 3 - 4 (side) \ 5 - 6^ (master) - 7 (topic) Find out which branches is 2 merged into: After we calculated that master contains 2, we can mark 6 as TEMP_MARK to avoid unwanted walks. When we want to figure out if 2 is merge into the topic, the traversal path would be [7, 6] instead of [7, 6, 5, 3, 2]. Test: This change can significantly improve performance for tags. On a copy of the Linux repository, the command 'git tag --contains <commit>' had the following performance improvement: commit | Before | After | Rel % 47a44d27ca | 29251ms | 6687ms | -77% 90327e7dff | 21388ms | 6256ms | -70% f85fac0efa | 11150ms | 7338ms | -34% The current version ignores tags, even though the tag is a type of the ref. Follow-up commits I'll fix it. Change-Id: Ie6295ca4d16070499912af462239e679a97cce47 Signed-off-by: kylezhao <kylezhao@tencent.com> Reviewed-by: Christian Halstrick <christian.halstrick@sap.com> Reviewed-by: Martin Fick <mfick@codeaurora.org>
| * | | | | | | | | Add org.bouncycastle.bcutil to p2 repositoryMatthias Sohn2021-09-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 575621 Change-Id: I57de7af9f9b236cac570d9c10c3d1c3886720868
* | | | | | | | | | DFS block cache: allow multiple passes for blocks before evictionAlina Djamankulova2021-10-083-12/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let certain pack extensions that are expensive to load from storage (e.g. pack index, bitmap index) stay in DFS block cache longer than others by overriding default cache count through DfsBlockCacheConfig Don't change default behavior when cache override map is empty. Use int cacheCount instead of boolean hot for Ref<T> Signed-off-by: Alina Djamankulova <adjama@google.com> Change-Id: I18062784ec9cc14dbba3e4bb8d9509440cf2d44f
* | | | | | | | | | GarbageCollectCommand: add numberOfBitmaps to statisticskylezhao2021-10-083-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I630afac9408c7313d1cecb1b24476f645c94fc27 Signed-off-by: kylezhao <kylezhao@tencent.com>
| | | | | | | | | * Prepare 6.0.0-SNAPSHOT buildsMatthias Sohn2021-10-0688-121/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iac4504923b34e29b5981cb77fdbe9e4cac7e625e
| | | | | | | | | * JGit v6.0.0.202110060947-m1v6.0.0.202110060947-m1Matthias Sohn2021-10-0688-121/+121
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I182115d974d5ef3e611e0e082667d7e51d8babd0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Rename a local variableThomas Wolf2021-09-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid a warning about a name clash with the field. Change-Id: Ib1950486a9c63647e4240a268a3c9a7d613f3303 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | | Remove redundant type argumentsThomas Wolf2021-09-3028-31/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Java 11 type arguments for anonymous subclasses can be inferred and don't need to be specified. This resolves a number of compiler warnings. Change-Id: I55eff3babb7628aa0627085e65a1b45eb12c2cd3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | | Delete old target platforms and corresponding Orbit releasesMatthias Sohn2021-09-2928-1504/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We updated the baseline target platform to jgit-4.17 corresponding to Eclipse 4.17 (2020-09). Delete all target platforms older than this version and the corresponding Orbit releases. Change-Id: I93b2d8585bdc3c3312264d34657ceaf3f4a27bd5
* | | | | | | | | Update tycho to 2.5.0 and target platform to jgit-4.17Matthias Sohn2021-09-292-99/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | jgit-4.17 corresponds to Eclipse 2020-09, which is the first Eclipse version that required Java 11, and which is JGit's new baseline as of JGit 6.0. Remove pack200 which is deprecated in Java 11 and isn't supported by tycho 2.5.0 anymore. It was specified in JSR 200 (J2SE 1.5) [1], deprecated in JEP 336 (Java SE 11) [2] and removed in JEP 367 (Java SE 14) [3]. [1] https://www.jcp.org/en/jsr/detail?id=200 [2] https://openjdk.java.net/jeps/336 [3] https://openjdk.java.net/jeps/367 Change-Id: I12c196586397779d2be81d2374207703e3fc5dbf