summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix warning about using raw typeMatthias Sohn2024-04-291-1/+1
| | | | | | | | | | This fixes the warning in UploadPackHandleDeletedPackFileTest. line 116: "Type safety: The method register(Object, Repository) belongs to the raw type TestProtocol. References to generic type TestProtocol<C> should be parameterized." Change-Id: I5a74269f1af7369dd397dd0f1c3cd807c0351367
* [errorprone] Fix pattern ModifiedButNotUsedMatthias Sohn2024-04-293-1/+5
| | | | | | See https://errorprone.info/bugpattern/ModifiedButNotUsed Change-Id: I3bd3f865d50a26af6c594391de5adf35230c984f
* [errorprone] Fix pattern CatchAndPrintStackTraceMatthias Sohn2024-04-292-13/+14
| | | | | | See https://errorprone.info/bugpattern/CatchAndPrintStackTrace Change-Id: I7a6698293d1485f384c275bf7e4dcddc529af4a1
* [errorprone] Fix pattern FutureReturnValueIgnoredMatthias Sohn2024-04-294-9/+9
| | | | | | See https://errorprone.info/bugpattern/FutureReturnValueIgnored Change-Id: I7225fd6388ce70ed5eea9e61b29bd10e1a927acb
* [errorprone] Fix pattern BadImportMatthias Sohn2024-04-295-11/+8
| | | | | | See https://errorprone.info/bugpattern/BadImport Change-Id: I24e5a7a4a64d8b3cf2cc3d394090ce90e849f9f9
* [errorprone] Fix pattern UseCorrectAssertInTestsMatthias Sohn2024-04-292-4/+6
| | | | | | See https://errorprone.info/bugpattern/UseCorrectAssertInTests Change-Id: Iffde63ac795ad30c3e7774764cb8189cb089ed86
* [errorprone] Fix pattern ProtectedMembersInFinalClassMatthias Sohn2024-04-292-2/+2
| | | | | | See https://errorprone.info/bugpattern/ProtectedMembersInFinalClass Change-Id: I5993093ca012f091dfe8ee1f2099b9596c2ee697
* [errorprone] Fix pattern CatchFailMatthias Sohn2024-04-299-13/+20
| | | | | | See https://errorprone.info/bugpattern/CatchFail Change-Id: If1c637a420c4e669a5bdbe4abcefc5c3a2b3a43b
* [errorprone] Fix pattern see UnusedVariableMatthias Sohn2024-04-299-37/+31
| | | | | | See https://errorprone.info/bugpattern/UnusedVariable Change-Id: I75d7602af31ed7d3264d2beab2d159cfbf29e7cb
* [errorprone] Fix pattern LongLiteralLowerCaseSuffixMatthias Sohn2024-04-294-8/+8
| | | | | | See https://errorprone.info/bugpattern/LongLiteralLowerCaseSuffix Change-Id: I139eadef5d66dfed2952ba9e1c91b3fe83259e97
* [errorprone] Fix error pattern JdkObsoleteMatthias Sohn2024-04-2940-113/+106
| | | | | | See https://errorprone.info/bugpattern/JdkObsolete Change-Id: Id105e2695eb64523bd217f507bf95f909bc6b348
* [errorprone] Fix UnnecessaryParentheses errorsMatthias Sohn2024-04-2810-48/+50
| | | | | | See https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: I783fd24286ec1bd55efbf21d05758465f4af87ee
* Bazel: Update RBE docker image to Ubuntu 22.04 and JDK 17David Ostrovsky2024-04-282-11/+10
| | | | | | | | | | | | | | | In this change we update the JDK used in RBE to JDK 17. Use Ubuntu 22.04 docker image with JDK 17 from Bazel project as the new base image. So that we don't need to maintain our own docker image any more. Also align the naming convention for the docker images with the Bazel project: <OS version>-<JDK version>, and remove "rbe"-prefix from the docker image name, because the image doesn't have any RBE specifics and could be used for Gerrit build and tests outside of the RBE pipeline. Change-Id: I617354c79301ec6dd52161dd3727f646c2a8ac56
* Bump Bazel version to 7.1.1David Ostrovsky2024-04-283-1/+7
| | | | | | | | | | | | | In Bazel 7.x release line, the bzlmod feature is activated per default, so that we need to disable it. See this issue for more details: [1]. Test plan: $> bazel test //... [1] https://github.com/bazelbuild/bazel/issues/18958 Change-Id: I2526d93020c5d82314a09206907ebeed6f1a1700
* ResolveMerger: Fix the issue with binary modify-modify conflictsSruteesh2024-04-253-38/+230
| | | | | | | | | | | 1) If the file was marked as binary by git attributes, we should add the path to conflicts if content differs in OURS and THEIRS 2) If the path is a file in OURS, THEIRS and BASE and if it is a binary in any one of them, no content merge should be attempted and the file content is kept as is in the work tree Bug: jgit-14 Change-Id: I9201bdc53a55f8f40adade4b6a36ee8ae25f4db8
* Explain why RacyGitTests may be flaky in some environmentsMatthias Sohn2024-04-201-0/+16
| | | | Change-Id: I5bbd04754f5f29299a7b9a58a3717e3f615199d0
* Merge "PackBitmapIndexBuilder.StoredEntry: add getter for objectId"Ivan Frade2024-04-121-4/+16
|\
| * PackBitmapIndexBuilder.StoredEntry: add getter for objectIdSam Delmerico2024-04-121-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you only have access to the PackBitmapIndexBuilder there is no way to get the ObjectId from a StoredEntry instance without also having access to a reverse pack index. The StoredEntry can provide the idxPosition, but the PackBitmapIndexBuilder's getObject method requires a ridxPosition in order to find an ObjectId. Providing an ObjectId from the StoredEntry gives this information directly and also allows a caller to get the ridxPosition if desired by calling PackBitmapIndexBuilder.findPosition(objectId) without needing an index object. This closes the operations of the PackBitmapIndexBuilder such that any method can be called by using information provided by the other methods. Change-Id: I5a11479b9635cd6b5e7aaff2f862cd41069ac469
* | Merge "PackBitmapIndex: clarify naming of getObject inputs"Ivan Frade2024-04-123-19/+24
|\|
| * PackBitmapIndex: clarify naming of getObject inputsSam Delmerico2024-04-123-19/+24
| | | | | | | | | | | | | | | | The documentation for the getObject function seems to be a little outdated. This commit clarifies that this function accepts an offset based on the ordering of objects in the pack. Change-Id: Icffaf4fb72155c415f5fd248e721cab87a1a083e
* | Merge "Add more tests on rewriting parents in a RevWalk"Ivan Frade2024-04-111-9/+123
|\ \
| * | Add more tests on rewriting parents in a RevWalkMax Haslbeck2024-03-261-9/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I4e4ff67fb279edbcc3461496b132cea774fb742f introduced new behaviour that also rewrote parents in a RevWalk if no TreeFilter was set. This led to unexpected behaviour when users were fetching from chromium.googlesource.com. I added a few more tests to better describe the behaviour of RevWalk in regards to rewriting parents. Change-Id: I1a5e5f8a1de9d8dd0e3664918ac010644b3ef87b Signed-off-by: Max Haslbeck <haslbeck@google.com>
* | | Revert "[releng] Bump Bouncy Castle to 1.78"Thomas Wolf2024-04-1019-97/+97
| |/ |/| | | | | | | | | | | | | | | | | | | | | This reverts commit 718d121bb38860e66f6e34a4045aa6d5d9490e8a. Bouncy Castle 1.78 has broken OSGi metadata: the package imports in MANIFEST.MF are missing. See also [1] and [2]. [1] https://github.com/bcgit/bc-java/issues/1621 [2] https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/pull/1968#issuecomment-2048151288 Change-Id: Iedec921215dabe0b63fb0dd7f6a4b28c18f854a0 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | [releng] Bump Bouncy Castle to 1.78Thomas Wolf2024-04-0919-97/+97
| | | | | | | | | | | | | | | | | | | | Update version in pom.xml; update target platforms; update bazel workspace. Also update the p2 repository; the Bouncy Castle bundle symbolic names have changed from plain "bc*" to "bc*-jdk18on". Change-Id: I07a5709c791f644d2247c76404a36ba7d0625a1c Signed-off-by: Thomas Wolf <twolf@apache.org>
* | Merge changes Ib7e3e562,I9d1f641c,Ia50445b8Thomas Wolf2024-04-0912-83/+340
|\ \ | | | | | | | | | | | | | | | | | | * changes: [gpg] Remove obsolete import-package [gpg] Correct finding public keys from pubring.gpg [gpg] Fix reading ed25519 GPG keys
| * | [gpg] Remove obsolete import-packageThomas Wolf2024-04-081-1/+0
| | | | | | | | | | | | | | | Bug: jgit-46 Change-Id: Ib7e3e562ca7ef9a30dfb7a1198f729bb389a5208 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | [gpg] Correct finding public keys from pubring.gpgThomas Wolf2024-04-085-56/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a master key not enabled for signing, and a signing sub-key, key lookup went wrong in several ways and might not find a suitable key for signing or for signature verification. Fix the code so that it finds the sub-key, even if user.signingKey is specified not with a key ID but with an with an e-mail. (Sub-keys don't have user ids, those are attached only on the master key.) Change-Id: I9d1f641c49b173d4daffb3fd2e74f5aabd856e39 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | [gpg] Fix reading ed25519 GPG keysThomas Wolf2024-04-086-26/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The S-expression parser from Bouncy Castle parsed such keys wrongly; there is a "flags" sub-list before the "q" value. Additionally, the parser validates the key read against the given public key, this failed because Bouncy Castle does not know the OID of curve name "Ed25519". Fix this and add a test for reading an ed25519 GPG key. Bug: jgit-27 Change-Id: Ia50445b88759927d2e80b9871d498fbe5ad201bc Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | Merge "MergeAlgorithm: Fix diff3 conflict hunk computation"Ivan Frade2024-04-092-2/+24
|\ \ \ | |/ / |/| |
| * | MergeAlgorithm: Fix diff3 conflict hunk computationAntonin Delpeuch2024-04-092-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/eclipse-jgit/jgit/issues/38. The previous code computed the boundaries of the base part of conflict hunks using line numbers computed for the 'ours' and 'theirs' revisions, leading to incorrect boundaries. This only affects the presentation of merge conflicts in diff3 mode (which is probably not used a lot yet on Gerrit). Successful merges are unaffected. Change-Id: I173c79bf5797896dc854791d6d05cb3f035726f4 Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
* | | PackBitmapIndexBuilder: make StoredEntry constructor publicSam Delmerico2024-04-031-1/+15
| | | | | | | | | | | | | | | | | | This POD data structure can be used externally Change-Id: I464c45b93d0a56deaadbfe31df57a87e1054741c
* | | Merge "PackBitmapIndexBuilder: allow repeated call of getCompressedBitmaps()"Ivan Frade2024-04-021-2/+3
|\ \ \
| * | | PackBitmapIndexBuilder: allow repeated call of getCompressedBitmaps()Sam Delmerico2024-04-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each call of the current implementation of PackBitmapIndexBuilder.getCompressedBitmaps reverses the class member that is returned. So two subsequent calls of this function will receive reversed structures. Instead we should just reverse a copy of the structure. This way the PackBitmapIndexBuilder can continue to efficiently accept new bitmaps via processBitmapForWrite (because we can continue to add to the back of the bitmapsToWrite ArrayList) while ensuring that the bitmaps are returned in the correct ordering from getCompressedBitmaps. Change-Id: If7364222b9e62920c0c2c06894716fe85dd13315
* | | | DfsPackFile: Make the loader classes used to construct bitmaps public.jackdt@google.com2024-04-021-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary to swap out implementations of the PackBitmapIndex with custom implementations. Change-Id: Ia6f951bbc901446c255fa2902fab05d7ed974111
* | | | DfsPackFile: make public the constructor with bitmap loaderIvan Frade2024-04-011-1/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor with the bitmap loader as a parameter is supposed to be used from subclasses in the ObjectDatabase, but those subclasses cannot see it with its current package-private visibility. Make it public, so it can be used as intended. Change-Id: I4afca3d2a13c4a41a766d08c5aa54bde352915a6
* | / PackWriter: writeBitmapIndex takes bitmap index writerSam Delmerico2024-03-296-22/+76
| |/ |/| | | | | | | | | | | PackWriter.writeBitmapIndex now takes an interface which will perform the writing of the bitmap index to an arbitrary backing storage. Change-Id: Icba89321d56f7b652bbcbfcd5ed3ec74999cb8c4
* | PackBitmapIndex: convert from class to interfaceSam Delmerico2024-03-253-5/+5
| | | | | | | | | | | | | | | | | | This abstract class can be an interface after https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1184614 moved the packChecksum data behind a getter interface. This also allows easier overriding of this interface with custom types. Change-Id: I89851de678e7ff896cc086455907e2898d2eecf6
* | Merge "DfsGarbageCollectorTest: add test for bitmap index creation"Ivan Frade2024-03-201-1/+67
|\ \
| * | DfsGarbageCollectorTest: add test for bitmap index creationSam Delmerico2024-03-181-1/+67
| | | | | | | | | | | | Change-Id: Ibb9b2f8fc0f5180728904f243bf372f8a233383d
* | | Merge "PackBitmapIndex: hide packChecksum behind getter"Ivan Frade2024-03-203-3/+16
|\| |
| * | PackBitmapIndex: hide packChecksum behind getterSam Delmerico2024-03-183-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | This allows more flexibility in overriding the PackBitmapIndex and also allows us to turn PackBitmapIndex into an interface in https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1178201. Change-Id: I3be611fad67ff38b308c0052a04149f1497858ae
* | | Merge "Cache refreshed loose ref dirs in SnapshottingRefDirectory"Matthias Sohn2024-03-201-2/+26
|\ \ \
| * | | Cache refreshed loose ref dirs in SnapshottingRefDirectoryNasser Grainawi2024-03-191-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update SnapshottingRefDirectory to have a cache of dirs refreshed for loose refs. This should help improve performance when 'after_open' setting is used for 'trustLooseRefStat' as duplicate refreshes are avoided when a snapshot of the ref database is used in a request scope. Change-Id: I8f66e7cee572e477d29abe2d9db69e97bca3ee4c Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com> Co-authored-by: Martin Fick <quic_mfick@quicinc.com> Co-authored-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | Merge "TreeRevFilter: correct changedPathFilter usage for multi-paths inclusion"jonathantanmy2024-03-193-6/+33
|\ \ \ \ | |/ / / |/| | |
| * | | TreeRevFilter: correct changedPathFilter usage for multi-paths inclusionXing Huang2024-03-183-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expected behavior of TreeRevFilter when filtering multiple file paths is to include commits that changed at least one of the given paths; only skipping them if they did not change any of the given paths. The current changedPathFilter utilization logic is skipping a commit if there exists at least one given path that the commit did not change, disregarding the rest of the given paths. Enforcing all given paths to be checked by the changedPathFilter, only skipping a commit if changedPathFilter return negative on all given paths. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: Ib7a9e496b37ec737722fbf33c5d0f05d5d910a8d
* | | | Merge "CleanupService: preload JgitText if not running in OSGi"Thomas Wolf2024-03-182-18/+49
|\ \ \ \ | |/ / / |/| | |
| * | | CleanupService: preload JgitText if not running in OSGiThomas Wolf2024-03-152-18/+49
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load class JGitText eagerly when ShutdownHook is used. If not running in an OSGi framework, the hook executes as a JVM shutdown hook. Normally classloading in a shutdown hook should not be a problem, but there are some other frameworks besides OSGi that may close classloaders before such a JVM shutdown hook runs, for instance Plexus classworlds used in maven. This is not a full fix for classloading problems in JGit shutdown hooks. If a listener causes additional classes to be loaded, there may still be problems. But the current listeners registered with ShutdownHook all appear to use only classes that should already be loaded; except JGitText. Bug: jgit-36 Change-Id: Iab00134b4720adb19e1394c38ad79f1c43c3466b Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | PathFilterGroup: implement getPathsBestEffort()Xing Huang2024-03-183-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getPathsBestEffort() is a method in the TreeFilter class to retrieve file paths specified by the caller. PathFilterGroup do not propagate the paths of their subfilters as it does not implement the getPathsBestEffort() method, resulting in the caller only getting an empty list of paths. Override getPathsBestEffort() in PathFilterGroup to propagate subfilter values. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I76bf08795360abc0874a7c258636d4f37da35060
* | | DfsPackFile: get commitGraph.readChangePaths from repo configXing Huang2024-03-143-1/+74
| |/ |/| | | | | | | | | | | | | | | | | | | By default, CommitGraphLoader reads the readChangedPaths flag from SystemReader ignoring the values set at repo-level. Read the value of the property from the repo configuration and pass it to CommitGraphLoader. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I34c807714c5a7573769ba9d611457aa107006244
* | Merge "CommitGraphLoader: receive readChangedPaths as parameter"Ivan Frade2024-03-121-11/+40
|\ \