aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configsLaura Hamelin2024-11-082-0/+93
| | | | | | | | | | | | | | | | | CacheHotMap is currently only set on the base DfsBlockCacheConfig and is not propagated down to PackExt specific caches. Because CacheHotMap is set from a method call rather than from Configs, this change sets per-PackExt CacheHotMap configs on PackExt cache configs both when DfsBlockCacheConfig#setCacheHotMap(...) is called, and when DfsBlockCacheConfig#configure(...) is called after setCacheHotMap. The outer DfsBlockCacheConfig keeps the full CacheHotMap for the same reason that the CacheHotMap config is propagated in both setCacheHotMap and configure: the order of operations setting the configuration from Configs and calling setCacheHotMap is not guaranteed. Change-Id: Id9dc32fedca99ecc83c9dc90c24d9616873a202e
* GPG: use BC PGP secret key parsing out of the boxThomas Wolf2024-11-0611-1585/+94
| | | | | | | | | Remove the custom S-expression parsing; BC has gotten many improvements in 1.79 regarding PGP ed25519 keys, AES/OCB encryption, and generally parsing key files. It now can do all we need. Change-Id: I392443e040cce150a9575d18795a7cb8195a3515 Signed-off-by: Thomas Wolf <twolf@apache.org>
* [errorprone] bc: Remove unused SExprParser#parseSecretKeyIvan Frade2024-11-051-148/+0
| | | | | | | | | | errorprone complains about using Date in the SExprParser class. All the usages are in a variant of the parseSecretKey method that doesn't have any callers. Remove the unused method. Change-Id: I80f5aa58877b9da31729cb90b0219e45d96144a8
* Update bouncycastle to 1.79Matthias Sohn2024-11-0522-104/+111
| | | | Change-Id: Ib81d73075ebc9dcdc73aacf30fa02ad56a502d51
* Update bytebuddy to 1.15.10Matthias Sohn2024-11-0521-60/+60
| | | | Change-Id: I49cd5bedd86601380a26f7a7213fc78ebd091393
* Merge branch 'stable-7.1'Matthias Sohn2024-11-058-5/+479
|\ | | | | | | | | | | | | | | | | * stable-7.1: Add missing @since 7.1 to UploadPack#implies ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider Add Union merge strategy support Change-Id: Ib1c1725578e522c88f80f050d221a517bf012017
| * Add missing @since 7.1 to UploadPack#impliesMatthias Sohn2024-11-051-1/+3
| | | | | | | | Change-Id: Iabbe1f18a5022b4669a3352493c6fd35920ef25f
| * Merge branch 'stable-7.0' into stable-7.1Matthias Sohn2024-11-057-4/+476
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-7.0: ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider Add Union merge strategy support Change-Id: I15674134f4c73ac2de514d4fac4a36fca7ed7b07
| | * Merge branch 'stable-6.10' into stable-7.0Matthias Sohn2024-11-059-4/+440
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.10: ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider Add Union merge strategy support Change-Id: I0d768d793effd1deabb4807446a4f8c10a82ad74
| | | * ResolveMerger: Allow setting the TreeWalk AttributesNodeProviderNasser Grainawi2024-11-052-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a merger is created without a Repository, no AttributesNodeProvider is created in the TreeWalk. Since mergers are often created with a custom ObjectInserter and no repo, they skip any lookups of attributes from any of the gitattributes files (within a tree, in the repo info/ dir, or user/global). Since there are potentially merge-affecting attributes in those files, callers might want to use both a custom ObjectInserter and an AttributesNodeProvider. Change-Id: I7997309003bbb598e1002261b3be7f2cc52066c8
| | | * Add Union merge strategy supportNasser Grainawi2024-11-047-4/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow users to specify the `union` strategy in their .gitattributes file in order to keep lines from both versions of a conflict [1]. [1] https://git-scm.com/docs/gitattributes.html#Documentation/gitattributes.txt-union Change-Id: I74cecceb2db819a8551b95fb10dfe7c2b160b709
* | | | Merge "DfsPackCompactor: write object size index"Ivan Frade2024-11-042-0/+61
|\ \ \ \
| * | | | DfsPackCompactor: write object size indexIvan Frade2024-11-012-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the compactor is not writing the object size index for packs. As it is using PackWriter to generate the packs, it needs to explicitely call the writes of each extension. Invoke writeObjectSizeIndex in the compactor. The pack writer will write one if the configuration says so. Change-Id: I8d6bbbb5bd67bfc7dd511aa76463512b1e86a45d
* | | | | [errorprone] BaseRepositoryBuilder: Use #split(sep, limit)Ivan Frade2024-11-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | String.split(String) and Pattern.split(CharSequence) have surprising behaviour [1]. We use one of the recommended replacements: #split(sep, limit). [1] https://errorprone.info/bugpattern/StringSplitter Change-Id: Ie1cf7590bd8660d21c79c5c3c1bc2765e5d9462b
* | | | | [errorprone] Remove deprecated security managerIvan Frade2024-11-019-362/+7
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone warns about this deprecated classes. The recommendation is stop using SecurityManager all together. The Security Manager is deprecated and subject to removal in a future release. There is no replacement for the Security Manager. See JEP 411 [1] for discussion and alternatives. [1] https://openjdk.org/jeps/411 Change-Id: I3c67136e97d13cf24b85e41d94408631c26e8be8
* | | | [errorprone] RefDatabase: #getConflictingNames immutable returnIvan Frade2024-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone reports that: This method returns both mutable and immutable collections or maps from different paths. This may be confusing for users of the method. Return always an immutable collection. Change-Id: Id48f3645fd06c8bc72212af180d7d02c7e0b7632
* | | | Merge "DfsGarbageCollector: Add setter for reflog expiration time."Ivan Frade2024-10-312-0/+119
|\ \ \ \
| * | | | DfsGarbageCollector: Add setter for reflog expiration time.Saril Sudhakaran2024-10-312-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit reftable writer/compator knows how to prune the history, but the DfsGarbageCollector doesn't expose the time limit. Add a method to DfsGarbageCollector to set the reflog time limit. This value is then passed to the reftable compactor. Callers usually pass here the value from gc.reflogExpire. The reflog block length is stored in 24 bits [1], limiting the size to 16MB. I have observed that in repositories with frequent commits, reflogs hit that size in 6-12 months. [1] https://git-scm.com/docs/reftable Bug: jgit-96 Change-Id: I8b32d6d2b2e1d8af8fb7d9f86225d75f1877eb2f
* | | | | Merge "[errorprone] HttpConnection: Add missing summary in java"Ivan Frade2024-10-311-0/+16
|\ \ \ \ \
| * | | | | [errorprone] HttpConnection: Add missing summary in javaIvan Frade2024-10-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The constants don't have summary and errorprone complains about it. Change-Id: Id1470ed9fd54cf7fd684045c5631acc1a8d450c2
* | | | | | Merge "[errorprone] PackWriter: Fix javadoc tag in new #writeIndex method"Ivan Frade2024-10-301-2/+2
|\| | | | |
| * | | | | [errorprone] PackWriter: Fix javadoc tag in new #writeIndex methodIvan Frade2024-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduced this method recently and the javadoc is not correct: error: [InvalidInlineTag] This tag is invalid. @code{PackIndexWriter} instance to write the index Change-Id: I34ed3d8b5a121fea9b8163627b46ae4a289c9462
* | | | | | Merge "[errorprone] SeparateClassloadertTestRunner: use #split(String,int)"Ivan Frade2024-10-301-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | [errorprone] SeparateClassloadertTestRunner: use #split(String,int)Ivan Frade2024-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone recommends to use String.split(String, int) as it has a less surprising behaviour with empty entries. https://errorprone.info/bugpattern/StringSplitter Change-Id: I48a01ee18d66bbb4a177aee576629dc5132d4a38
* | | | | | [errorprone] ByteArraySet: Add summary fragment to javadocIvan Frade2024-10-301-3/+9
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Reported by error prone. Change-Id: Icaa69c37d0cde19fc605cb3f3c5f9ed9abfb37d3
* | | | | [errorprone] util.Stats: Add summary fragment to javadocIvan Frade2024-10-301-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone complains about missing summary in these javadocs. [MissingSummary] A summary fragment is required; consider using the value of the @return b lock as a summary fragment instead. * @return variance of the added values ^ (see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment) Did you mean '*Returns variance of the added values.'? Change-Id: I29d633ec95c18b17cc92b069dd1a94fbb2a75c94
* | | | | Merge "PackWriter: make PackWriter.writeIndex() take a PackIndexWriter"Ivan Frade2024-10-294-24/+57
|\ \ \ \ \
| * | | | | PackWriter: make PackWriter.writeIndex() take a PackIndexWriterSam Delmerico2024-10-284-24/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the PackWriter implementation required that indexes and their extensions be writable to an OutputStream with a fixed binary format. To support more general index storage formats, allow PackWriter to accept an PackIndexWriter interface which accepts only the objects to store. This allows implementors to choose their storage format. The implementation will be provided by the DfsObjectDatabase. The DfsObjectDatabase is already responsible for providing the OutputStream that was previously used to write indexes. Having it provide a writing interface would be a natural generalization. This idea was previously implemented for PackBitmapIndex writing in https://gerrithub.io/c/eclipse-jgit/jgit/+/1177722. Change-Id: I582d2f3d25d6adb2da243d6d0d7bc405a97d6183
* | | | | | DfsInserter: Read minBytesForObjectSizeIndex only from repo configIvan Frade2024-10-291-21/+7
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general, JGit reads the configuration it needs from the repository configuration. minBytesForObjectSizeIndex is a special case with a setter for subclasses but that is unnecessary. Remove the setter and read the conf from the repo. Make the property final and read it directly from the conf (it is clearer than parsing a whole PackConfig to read a single value). Change-Id: I8d77247452ff65e6c431fdcfebb90ed2ce40aed1
* | | | | Merge "dfs: update getBlockCacheStats to return a List of BlockCacheStats"Ivan Frade2024-10-288-60/+150
|\ \ \ \ \
| * | | | | dfs: update getBlockCacheStats to return a List of BlockCacheStatsLaura Hamelin2024-10-288-60/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make available all underlying cache table stats for the used cache table implementation. The existing cache table stats implementation only allows a "global" view of the cache table statistics; it does not differentiate between all possible underlying cache tables used. This change allows callers to get the block cache stats broken down per underlying table. These cache stats are intended to be used for monitoring all cache tables independently. Existing usages of getBlockCacheStats now make use of AggregatedBlockCacheStats.fromStatsList to aggregate the list of BlockCacheStats into a single BlockCacheStats instance. Change-Id: I261b3f2849857172397657e5c674b11e09807f27
* | | | | | Merge "Replace custom encoder Constants#encodeASCII by JDK implementation"Matthias Sohn2024-10-261-7/+13
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Replace custom encoder Constants#encodeASCII by JDK implementationMatthias Sohn2024-09-061-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the method still throws an IllegalArgumentException for malformed input or if the String contains unmappable characters. Change-Id: I6a340aa1af60c315272ff13b6bf2041ba30c94ca
* | | | | | Update mockito to 5.14.2Matthias Sohn2024-10-2421-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0e6442a86ba1790680b832d62d4b04df0713da5f
* | | | | | Update bytebuddy to 1.15.7Matthias Sohn2024-10-2421-60/+60
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8f718f0b06887c8ebfe70941dc2730604f0790e0
* | | | | | Merge branch 'stable-7.1'Matthias Sohn2024-10-240-0/+0
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-7.1: Prepare 7.1.0-SNAPSHOT builds JGit v7.1.0.202410232130-m2 Prepare 7.1.0-SNAPSHOT builds JGit v7.1.0.202410012040-m1 Change-Id: I6647fe6dede0d15828ebd3bccae1565a374fa17f
| * | | | | Prepare 7.1.0-SNAPSHOT buildsMatthias Sohn2024-10-2489-123/+123
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibaddbad3677636452cad4e8b7ce0a58b1a78f833
| * | | | | JGit v7.1.0.202410232130-m2v7.1.0.202410232130-m2Matthias Sohn2024-10-2389-123/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ibae7987afb2459fa77c6b151606fbf69fc8a8f49
| * | | | | Merge branch 'master' into stable-7.1Matthias Sohn2024-10-23203-676/+6753
| |\ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: SSH signing: implement a SignatureVerifier SSH signing: implement a Signer PackIndexWriter: create interface to write indexes Add `numberOfPackFilesAfterBitmap` to RepoStatistics SSH signing: don't require a session in PasswordProviderWrapper SSH signing: make OpenSSH pattern matching public SSH signing: prepare config ssh: add a factory for KeyPasswordProvider DfsBlockCacheConfig: update stream.toList to collect(toList) DfsBlockCache: refactor stats implementations. DfsBlockCacheConfigs: add debug configuration print Test advertised capabilities with protocol V0 and allow*Sha1InWant Align request policies with CGit DfsReaderOptions: read loadRevIndexInParallel from config UploadPack: suppress resource warning for DepthWalk.RevWalk Update Apache sshd to 2.14.0 LfsConnectionFactoryTest: remove unnecessary cast JSchSshProtocol2Test: remove unnecessary cast ApacheSshProtocol2Test: remove unnecessary cast NoteMapMerger: remove unnecessary cast Update jetty to 12.0.14 Update Apache sshd to 2.14.0 orbit-4.34: update junit bundle to 4.13.2.v20240929-1000 WindowCursor: Fix parameter name in javadoc RevolveMerger: honor ignoreConflicts also for binary files dfs: add configurable name to block cache table stats DfsBlockCache: use PackExtBlockCacheTable when configured Change-Id: I1483aab03c6c01a0b11d4eaa2f7722cb53fe5837
* | | | | | Merge branch 'stable-7.0'Matthias Sohn2024-10-230-0/+0
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-7.0: Update Apache sshd to 2.14.0 LfsConnectionFactoryTest: remove unnecessary cast JSchSshProtocol2Test: remove unnecessary cast ApacheSshProtocol2Test: remove unnecessary cast NoteMapMerger: remove unnecessary cast Change-Id: Iade9d1fd01452ca12b4f75731fd13d02a5ac5e55
| * | | | | Merge branch 'stable-6.10' into stable-7.0Matthias Sohn2024-10-2327-155/+157
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.10: Update Apache sshd to 2.14.0 LfsConnectionFactoryTest: remove unnecessary cast JSchSshProtocol2Test: remove unnecessary cast ApacheSshProtocol2Test: remove unnecessary cast NoteMapMerger: remove unnecessary cast Change-Id: I8fca74d88efadc827955b0a5032e6fbd72ce3e0d
| | * | | | Update Apache sshd to 2.14.0Matthias Sohn2024-10-1022-145/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an 'incorrect signature' error when trying to use the keys generated by SSHD during server init with an OpenSSH client. This also includes a few other changes since 2.13.2: * GH-524 Performance improvements * GH-533 Fix multi-step authentication * GH-582 Fix filtering in NamedFactory * GH-587 Prevent NullPointerExceptionon closed channel in NettyIoSession * GH-590 Better support for FIPS * GH-597 Pass on Charset in ClientSession.executeRemoteCommand() https://github.com/apache/mina-sshd/releases/tag/sshd-2.14.0 Change-Id: I76909fd56e70ee4ce16a075bd40ed6b2a609cc47
| | * | | | LfsConnectionFactoryTest: remove unnecessary castMatthias Sohn2024-10-102-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I08ed51b13aa269a4f6b64ac723b6bd7649c6591c
| | * | | | JSchSshProtocol2Test: remove unnecessary castMatthias Sohn2024-10-102-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id3767f43cbbfd0c05f9a7f0d5620943da874df92
| | * | | | ApacheSshProtocol2Test: remove unnecessary castMatthias Sohn2024-10-102-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie8e7b097e48342a9cda6873e8595146a1b3f1427
| | * | | | NoteMapMerger: remove unnecessary castMatthias Sohn2024-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3be4963f506529bbadc5b6dfc0b625ee85effc1f
* | | | | | Merge changes from topic "ssh-signatures"Matthias Sohn2024-10-23147-33/+5122
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: SSH signing: implement a SignatureVerifier SSH signing: implement a Signer SSH signing: don't require a session in PasswordProviderWrapper SSH signing: make OpenSSH pattern matching public SSH signing: prepare config ssh: add a factory for KeyPasswordProvider
| * | | | | | SSH signing: implement a SignatureVerifierThomas Wolf2024-10-23115-2/+3757
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signature verification needs quite a bit of infrastructure. There are two files to read: a list of allowed signers, and a list of revoked keys or certificates. Introduce a SigningKeyDatabase abstraction for these, and give client code the possibility to plug in its own implementation. Loading these files afresh for every signature to be checked would be prohibitively expensive. Introduce a cache of SigningKeyDatabases, and have them reload the files only when they have changed. Include a default implementation that works with the OpenSSH allowed signers file and with OpenSSH revocation lists. Binary KRLs are parsed according to [1]; the test data was generated using the OpenSSH test script[2]. [1] https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.krl [2] https://github.com/openssh/openssh-portable/blob/67a115e/regress/krl.sh Bug: jgit-44 Change-Id: I6a2fa24f38a2f2fe63ffb353da5b6665ca7277e1 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | | | | | SSH signing: implement a SignerThomas Wolf2024-10-2332-11/+1161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a Signer and its factory, and publish the factory for the ServiceLoader. SSH signatures can be created directly if the key is given via a file in user.signingKey and the private key can be found. Otherwise, signing is delegated to an SSH agent, if available. If a certificate is used as public key, the signer verifies the certificate (correct signature, and valid at the commit time). SSH signatures are documented at [1]. [1] https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.sshsig Bug: jgit-44 Change-Id: I3848ccc06ba3be5e868f879bd5705fee1b39c632 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | | | | | SSH signing: don't require a session in PasswordProviderWrapperThomas Wolf2024-10-221-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To read passphrase-protected private keys SSH signing will need to use a PasswordProviderWrapper without SSH session. Change-Id: I3ecac6c099f3ed1565fb4f0d56d55aee16edb9fc Signed-off-by: Thomas Wolf <twolf@apache.org>