summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update Apache commons-logging to 1.3.2Matthias Sohn2024-05-2120-38/+41
| | | | | | | Stop bundling the source bundle since the upstream artifact doesn't have a valid OSGi manifest. Change-Id: I819685f7f6d6ebcf8f179dd3133e7fc809bba392
* Update jetty to 10.0.21Matthias Sohn2024-05-2019-151/+151
| | | | Change-Id: I1d7bf0fb66d329aad24b512bed082e3f74a5b2a8
* Update Apache commons-io to 2.16.1Matthias Sohn2024-05-2019-35/+41
| | | | Change-Id: Ia8dec10b4d487611a9cad2268764fa53fcd35c47
* Update Apache commons-codec to 1.17.0Matthias Sohn2024-05-2019-36/+42
| | | | Change-Id: Ife807c38cd163a75a70e91610127b01807be2f68
* WalkFetchConnection: Remove marked packs on all function exitsIvan Frade2024-05-161-6/+15
| | | | | | | | | | | | | [1] replaces Iterator.remove() with a list of "toRemove" that gets processed when returning at the end. There are two others returns in the function where the list is not processed. Let the method report the broken packages and wrap it so the caller can clean them up in any case. [1] https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1194812 Change-Id: I1ffb7829039f644df03b0b3ea1e5d10408ce19b7
* Merge "Do not use ArrayList when there will be deletions"Ivan Frade2024-05-163-27/+30
|\
| * Do not use ArrayList when there will be deletionsjackdt@google.com2024-05-163-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://gerrithub.io/c/eclipse-jgit/jgit/+/1194015, LinkedList was replaced with ArrayList in DfsReader and WalkFetchConnection. In this case, the Iterator.remove() method of List is called, which is an O(n) operation for ArrayList. This results in an O(n^2) algorithm. Instead of reverting to LinkedList, use a HashSet and LinkedHashmap instead. This maintains O(1) removal, and is less likely to be treated as an antipattern than LinkedList. A likely innocuous usage of Iterator.remove() in UnionInputStream was also fixed. Change-Id: I57d884440c726b2fc80c1b8b2bec9bd7e2e6e3fe
* | Merge changes I12e4d0fd,I082ffb20Matthias Sohn2024-05-163-45/+6
|\ \ | | | | | | | | | | | | | | | * changes: Remove unused API problem filters Fix warning "Redundant specification of type arguments <Object>"
| * | Remove unused API problem filtersMatthias Sohn2024-05-141-19/+0
| | | | | | | | | | | | Change-Id: I12e4d0fd48b5b7420d421874c8d63caed9628266
| * | Fix warning "Redundant specification of type arguments <Object>"Matthias Sohn2024-05-142-26/+6
| | | | | | | | | | | | | | | | | | Use a lambda to fix this and make the code easier to read. Change-Id: I082ffb2073f86d21deb4b51a24e53de9371b765e
* | | PatchApplierTest: remove unused importMatthias Sohn2024-05-151-1/+0
| |/ |/| | | | | Change-Id: Ie3ac82a8160c605e27ee3167e3640cd76b1b2a76
* | Merge "Allow applying a patch with conflicts"Matthias Sohn2024-05-158-21/+234
|\ \
| * | Allow applying a patch with conflictsPatrick Hiesel2024-05-148-21/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some settings, we want to let users apply a patch that does not cleanly apply and add conflict markers. In Gerrit, this is useful when cherry picking (via Git patches) from one host to another. This commit takes a simple approach: If a hunk doesn't apply, go to the pre-image line, treat all lines in pre-image length as left side of the conflict and all context and newly added lines as right side of the conflict. Change-Id: I01411d7a32b3f3207097b26231909aae6b835650
* | | Add 4.32 target platformMatthias Sohn2024-05-145-3/+316
| |/ |/| | | | | | | | | | | | | and - add orbit-4.32 - update objenesis to 3.4 Change-Id: Ia9df427eb3c97f867caaffbc92674fb750433aad
* | Merge "sshd: fix IdentiesOnly if SSH agent is enabled and has keys"Matthias Sohn2024-05-141-6/+7
|\ \
| * | sshd: fix IdentiesOnly if SSH agent is enabled and has keysThomas Wolf2024-05-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a44b9e8bf changed the logic so that we try to read a public key from the file given first, and only then try the file with the ".pub" extension. Unfortunately the exception handling was not sufficient to correctly deal with the given file containing a private key. Apache MINA SSHD may throw a StreamCorruptedException when one tries to read a public key from a file containing a private key. Handle this exception in addition to GeneralSecurityException, and change the order of exception handlers because StreamCorruptedException is an IOException. Bug: jgit-53 Change-Id: I7dddc2c11aa75d7663f7fe41652df612bf8c88cd Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | Update mina-sshd to 2.12.1Matthias Sohn2024-05-1318-51/+51
| | | | | | | | | | | | Change-Id: I3f7b76243af0add3ee66a7f808a73f10d01a7627
* | | Update byte-buddy to 1.14.15Matthias Sohn2024-05-1318-51/+51
| | | | | | | | | | | | Change-Id: Ie5192a7c02c60e26c7c76f618b05f24307afcc63
* | | Update org.apache.commons:commons-compress to 1.26.1Matthias Sohn2024-05-1318-34/+34
| | | | | | | | | | | | Change-Id: I53a0308145d1caa62a09b2262b721d155b62a4b8
* | | Update mockito to 5.12.0Matthias Sohn2024-05-1318-34/+34
| | | | | | | | | | | | Change-Id: Ia346c37673369ee497ab4797aa96d82fe51f84c0
* | | Update org.eclipse.jdt:ecj to 3.37.0Matthias Sohn2024-05-131-1/+1
| | | | | | | | | | | | Change-Id: Iedc5cd96f85367546f0b15df05ac242a38af3b16
* | | Update groovy to 4.0.21Matthias Sohn2024-05-131-2/+2
| | | | | | | | | | | | Change-Id: I7eb29ba080f6c2e3f4097977adf48b246c4a7822
* | | Update args4j to 2.37Matthias Sohn2024-05-1318-34/+34
|/ / | | | | | | Change-Id: I6f8c1cce050017aad5b0d36886f85c42c1a3aed9
* / Check an execution bit by reading it from the file systemYury Molchan2024-05-131-2/+11
|/ | | | | | | | Files.isExecutable() checks possibility to execute a file from the JVM, not POSIX attributes. So it fails when Java Security Manager does not allow to execute a file, but file has X-bit. Change-Id: I85b96fb6cedbaff1b3c063728c25b6ce4d04e9b9
* [releng] Bump Bouncy Castle to 1.78.1Thomas Wolf2024-05-1118-89/+89
| | | | | | | | | | Update version in pom.xml; update target platforms; update bazel workspace. BC 1.78 had broken OSGi metadata in MANIFEST.MF; this was fixed in 1.78.1. Change-Id: Iac5751910b283b04983abe399264e0dabfe6162c Signed-off-by: Thomas Wolf <twolf@apache.org>
* PackIndex: Make it an interfaceIvan Frade2024-05-083-23/+26
| | | | | | | | | | As we work on different backends for PackIndex, it is much easier to extend an interface than an abstract class. Note that PackIndex is alredy acting as an interface, offering barely any functionality. Change-Id: Icd0db0e96a097631c2b9c3b05e5700f601f606d5
* PackIndex: Make iterator static (pass object count in ctor)Ivan Frade2024-05-083-4/+18
| | | | | | | | | | | | The iterator uses an implicit reference to the external class to call #getObjectCount(). This implicit reference prevents PackIndex to become an interface. The object count is immutable and known at index (and iterator) construction time. Pass the object count in the constructor of the iterator and make it static. Change-Id: I4949ff943de2a88380fb7f4c9b65b089734854b9
* PackIndex: move checksum to the subclassesIvan Frade2024-05-084-10/+21
| | | | | | | | | | PackIndex is almost an interface, and making it so simplifies writing implementations over other storages. Checksum and its getter is the only functionality that is class specific. Make getChecksum abstract and implement it in the subclasses. Change-Id: I3746515d816abab075210505f1bb31b1936962e9
* GitDateFormatterTest: Remove printlnsIvan Frade2024-05-021-2/+0
| | | | | | Left overs from https://review.gerrithub.io/c/eclipse-jgit/jgit/+/204984 Change-Id: I169ce2a008ca70267323fa4fb0f1e54981f1ec33
* Bazel: Add support for JDK 21David Ostrovsky2024-05-025-16/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two failing tests when switching to JDK 21. One failure is related to the changed behaviour related to the locale providers. Adapt `GitDateFormatterTest` to changes in unicode [1]. Second failure related to changed behaviour in URL.openConnection(), see: [2] for more details. Before JDK 20, some of the parsing/validation performed by the JDK built-in URLStreamHander implementations were delayed until URL::openConnection or URLConnection::connect was called. Starting JDK 20, some of these parsing/validations are now performed early, i.e. within URL constructors. IOW, the assumption made in HttpSupport.TesttestMalformedUri() isn't met any more: providing mailformed URI to the URL ctor now throws an exception starting with JDK 20. To rectify the problem, remove the offending test. Test plan: To build with JDK 21 and run the tests locally: $> bazel test --config=java21 //... To build with JDK 21 and run the tests on RBE: $> bazel test --config=remote21 --remote_instance_name=$PROJECT //... [1] https://bugs.openjdk.org/browse/JDK-8304925 [2] https://bugs.openjdk.org/browse/JDK-8293590 Change-Id: I796de67f7945d5f1fa5e8146f4ec8cbe9ac7bd3e
* Merge "Bazel: Replace deprecated --experimental_strict_action_env option"David Ostrovsky2024-05-021-1/+1
|\
| * Bazel: Replace deprecated --experimental_strict_action_env optionDavid Ostrovsky2024-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In recent Bazel release the option was deprecated and replaced with: --incompatible_strict_action_env option. Hence this change is fixing this warning: WARNING: Option 'experimental_strict_action_env' is deprecated: Use --incompatible_strict_action_env instead Change-Id: I49645b084c338d9c2bfff8ad20831bcf18de6b53
* | Merge "PackIndex: Make #getOffset protected to allow out-of-package subclasses"Ivan Frade2024-05-012-2/+2
|\ \ | |/ |/|
| * PackIndex: Make #getOffset protected to allow out-of-package subclassesIvan Frade2024-04-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | PackIndex#getOffset is abstract and package-private, limiting subclasses to the same package. Given than the class and all other relevant methods are public, this looks like an oversight and it should be ok to write subclasses in other packages. Make the method protected, allowing to write PackIndex subclasses in other packages. Change-Id: I7d3762b0a6c0681c29bd827bbaf094f1ee4583d2
* | 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