aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | DescribeCommand: use java.time APIMatthias Sohn2024-12-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I46b1f12192fe40d3bb740c3ce8632fffcd5fc5de
| * | | | | Blame: use java.time APIMatthias Sohn2024-12-251-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: Ib54d66848b920436c40f7f754193a4dee9566feb
| * | | | | RebuildCommitGraph: use java.time APIMatthias Sohn2024-12-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I6e52a4f37180a079f592b5002c3a34c6fb7c8a97
| * | | | | Don't override maven-compiler-plugin versionMatthias Sohn2024-12-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since it's already set in the parent pom. Change-Id: I9ba0275dfddb9844951e62ce4537186b75ff2036
| * | | | | CommitCommandTest: use java.time APIMatthias Sohn2024-12-251-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I44947d26086396b0779ce6e1f9b9f30375032388
| * | | | | TestRepository: add version when annotated methods became deprecatedMatthias Sohn2024-12-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib9466bfbc3d7ecf53af88dd6b5bade7ae48c7165
| * | | | | SystemReader: add version when annotated methods became deprecatedMatthias Sohn2024-12-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a4e8c18378c1bcbf01c12a79d31cb5a2a050e97
| * | | | | AllowedSigners: use java.time APIMatthias Sohn2024-12-251-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I66147445b90df8ca8c8c65239bc9f1ca3f086e75
| * | | | | Show: use java.time APIMatthias Sohn2024-12-251-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I19a705329e5bae66df6532b956d74c981dde6f57
| * | | | | GitDateFormatter: use java.time APIMatthias Sohn2024-12-251-38/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date API to the java.time API. Change-Id: I904556f94cb28677cce565054bd2cd0f4fb2a096
| * | | | | Mark static method PersonIdent#getTimeZone as deprecatedMatthias Sohn2024-12-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since it's using java.util.Timezone. Instead promote usage of #getZoneId which uses ZoneId from the preferred java.time API. Change-Id: I15dee551a81acf0b8aafdbfcfcf200c0d38069f4
| * | | | | UploadPackTest: Construct PersonIdent with Instant/ZoneIdIvan Frade2024-12-231-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away of java.util.Date to the newers java.time API. PersonIdent has deprecated old constructors with long/int for time and tz and provides alternatives with Instant/ZoneId. Use the new constructors in PersonIdent. Change-Id: Ibb32f70818f44fdcc6875e6e706c4c56f85bbabd
| * | | | | LocalDiskRepositoryTestCase: Use java.time API to create PersonIdentIvan Frade2024-12-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is using deprecated methods in the mock system reader to invoke a deprecated constructor of PersonIdent. Both classes have now new methods with the java.time API. Use java.time methods to get the timestamp and timezone and build the PersonIdent. Change-Id: I4271d9d1d3c9128cfcedc680410448498530de88
| * | | | | RecursiveMerger: Create PersonIdent with java.time APIIvan Frade2024-12-231-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are moving away from the old java.util.Date api to the java.time.Instant version. This class uses a deprecated constructor in PersonIdent. Use the new constructor for PersonIdent with Instant/ZoneId. Change-Id: I50e2a643ad17a5c0722f87b1bb8abcad286745a5
| * | | | | RelativeDateFormatter: Use Instant instead of dateIvan Frade2024-12-233-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone suggest to use the more modern java.time.Instant instead of the older Date API. Offer a variant of RelativeDateFormatter#format method for Instants. Change-Id: I536230327ec7b617958191fbe36f98b1294f6d2e
| * | | | | ProposedTimestamp: mark unused methods as deprecatedIvan Frade2024-12-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | date() and timestamp() don't seem to have any use. I find only calls to instant(). Mark as deprecated to remove usages of java.util.Date and related classes. Change-Id: I4e77c64678295b5ea83ada253c0e120f7bae5843
| * | | | | PushCertificateStore: Use Instant, unused var, boxingIvan Frade2024-12-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PendingCerts are ordered using PersonIdent#getWhen, which returns the time as java.util.Date. That method is deprecated, as we are moving to the new java.time.Instant API. Sort the pending certs using the Instant time (PersonIdent#getWhenAsInstant). Take the chance to fix two minor warnings: * the inserter is never used in the try{} block * Unnecessary boxing in message format Change-Id: I211e5319dc9865bd5a3468c7f5bbc141a6d5e71e
| * | | | | SignatureUtils.toString(): allow null signature creation dateThomas Wolf2024-12-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some signatures may not have a "created at" timestamp, or the tool used to verify the signature does not report it. If we get none, do not report anything about the signature creation time. This can happen for instance if 'smimesign' is used for verifying x509 signatures. Change-Id: I1a63aa62ffe173e00f27e8aea539b26cd40387c0
| * | | | | Update assertj-core to 3.27.0Matthias Sohn2024-12-206-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib52a7e36f34e83ab42da9a1ee81de8ac7c7c24b1
| * | | | | Update jetty to 12.0.16Matthias Sohn2024-12-206-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iec52e35db378c3f58f9d80c7e721e98d5e8f01b2
| * | | | | Update bytebuddy to 1.15.11Matthias Sohn2024-12-206-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic101cbc37da273b52c8b5a334ca9ea5ecfc2bee6
| * | | | | Update commons-io:commons-io to 2.18.0Matthias Sohn2024-12-206-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I91c7bc8f856a490669be74df953443c143c61357
| * | | | | Add missing @since 7.2 to TestRepository#getTimeZoneIdMatthias Sohn2024-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icf3b29d075e5d91e64cea06dcd75119745bd13e0
| * | | | | Update maven pluginsMatthias Sohn2024-12-202-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - cyclonedx-maven-plugin to 2.9.1 - eclipse-jarsigner-plugin to 1.5.2 - git-commit-id-maven-plugin to 9.0.1 - gmavenplus-plugin to 4.0.1 - japicmp-maven-plugin to 0.23.0 - maven-artifact-plugin to 3.5.3 - maven-clean-plugin to 3.4.0 - maven-dependency-plugin to 3.8.1 - maven-deploy-plugin to 3.1.3 - maven-enforcer-plugin to 3.5.0 - maven-install-plugin to 3.1.3 - maven-jar-plugin to 3.4.2 - maven-javadoc-plugin-version to 3.11.2 - maven-jxr-plugin-version>3.6.0 - maven-pmd-plugin to 3.26.0 - maven-project-info-reports-plugin-version>3.8.0 - maven-shade-plugin to 3.6.0 - maven-site-plugin to 4.0.0-M16 - maven-surefire-plugin-version>3.5.2 - maven-surefire-report-plugin to 3.5.2 - spotbugs-maven-plugin-version>4.8.6.6 - spring-boot-maven-plugin to 3.4.1 - tycho to 4.0.10 Change-Id: I604c0550c98cb98ebc79817ee352ac5b0357d35f
| * | | | | Merge "http.server/BUILD: expose servlet resources as target"Ivan Frade2024-12-191-1/+6
| |\ \ \ \ \
| | * | | | | http.server/BUILD: expose servlet resources as targetIvan Frade2024-12-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit has moved to jakarta servlet-api, but gerrit is still in the javax version. This is blocking gerrit to update their jgit code. Gerrit can workaround this rebuilding the jar of jgit-servlet but it is complicated to pass-through the resources. Expose the resources of the servlet as a target, to help gerrit build a javax version of the jgit-servlet. Change-Id: Ifd794e4222ad442f4a538a4d38caa73d58be0f6d
| * | | | | | Merge "Merge branch 'stable-7.1'"Matthias Sohn2024-12-1932-4476/+127
| |\ \ \ \ \ \
| | * \ \ \ \ \ Merge branch 'stable-7.1'Matthias Sohn2024-12-2032-4476/+127
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | / / / | | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | * stable-7.1: WindowCache: share removal work among multiple threads Update target platform version in maven build to 4.32 (2024-06) Change-Id: Ic88bb210c5ea080b7553fadec2a1b8d71924365c
| | | * | | | Merge branch 'stable-7.0' into stable-7.1Matthias Sohn2024-12-2032-4476/+127
| | | |\ \ \ \ | | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-7.0: WindowCache: share removal work among multiple threads Update target platform version in maven build to 4.32 (2024-06) Change-Id: Idd6a8a2c3b5c6f53645dbe7144afb2e1e24e8ca3
| | | | * | | Merge branch 'stable-6.10' into stable-7.0Matthias Sohn2024-12-2032-4476/+127
| | | | |\ \ \ | | | | | | |/ | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.10: WindowCache: share removal work among multiple threads Update target platform version in maven build to 4.32 (2024-06) Change-Id: I6ca4988e9ea1e9fc6b3382b40f18f3d9db7b7acb
| | | | | * | WindowCache: share removal work among multiple threadsMartin Fick2024-12-191-5/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the removal process into blocks so that it can be shared by multiple threads. This potential work sharing can provide 2 optimizations for removals: 1) It provides an opportunity for separate removal requests to be consolidated into one removal pass. 2) It can reduce removing thread latencies by sharing the removal work with other removing threads which otherwise might not have any work to do due to their removal request being consolidated. This makes the system more efficient and can actually reduce latencies as system load increases due to pack removals! The optimizations above are all achieved without blockng threads to wait for other threads to complete (although naturally there are some synchronization points), and while ensuring that no threads do more work than if they were the only thread available to perform a removal. Change-Id: Ic6809a8abf056299abde0f0c58c77aaf245a8df5 Signed-off-by: Martin Fick <mfick@nvidia.com>
| | | | | * | Update target platform version in maven build to 4.32 (2024-06)Matthias Sohn2024-12-1931-4381/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The p2 repositories matching jgit-4.17 target platform were moved to the archive server and are no longer available on the download server. Update to the jgit-4.32 target platform which matches Eclipse platform 2024-06. Purge older target platforms to reduce our maintenance effort. Change-Id: I948400e5b8c0db2ab0d50f8fa4e0e42521302ce7
| * | | | | | CommitTimeRevFilter: add missing @sinceThomas Wolf2024-12-191-4/+10
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Annotate the new methods using Instant. Change-Id: I1dc4eec59b44e784bcc151bd6a28347f6fd0de03
| * | | | | transport: Remove usage of CommitTimeRevFilter with long and DatesIvan Frade2024-12-172-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [errorprone] The Date API is full of major design flaws and pitfalls and should be avoided at all costs. Prefer the java.time APIs, specifically, java.time.Instant (for physical time) and java.time.LocalDate[Time] (for civil time). Move callers to the CommitTimeRevFilter java.time.Instant API introduced in the parent commit. Change-Id: Ib92c56ae09f1ad3df7628a8c61212eb84250700d
| * | | | | CommitTimeRevFilter: Move to java.time APIIvan Frade2024-12-173-19/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate the methods using Date and offer the equivalent as Instant. Keep an int with seconds as internal representation, as it seems more efficient to compare than Instant.before/after. Change-Id: Ie751ab5661c7dafaab58a16c219143b78092f84a
| * | | | | Merge "Merge branch 'stable-7.1'"Matthias Sohn2024-12-176-61/+71
| |\ \ \ \ \
| | * | | | | Merge branch 'stable-7.1'Matthias Sohn2024-12-156-61/+71
| | |\| | | | | | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-7.1: FileSnapshot: fix warnings Optionally.Hard: avoid Optional creation on every use, Pack: fix threading bug getting idx Fix potential NPE in TreeWalk#getFilterCommandDefinition Advertise "agent" capability when using protocol v2 FileSnapshot: silence "Stale file handle" exceptions Change-Id: I772dd3b3ce7f27e33c1879ce21ec024cc2f9c52a
| | | * | | Merge branch 'stable-7.0' into stable-7.1Matthias Sohn2024-12-156-59/+66
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-7.0: FileSnapshot: fix warnings Optionally.Hard: avoid Optional creation on every use, Pack: fix threading bug getting idx Fix potential NPE in TreeWalk#getFilterCommandDefinition Advertise "agent" capability when using protocol v2 FileSnapshot: silence "Stale file handle" exceptions Change-Id: I4fdea7450f27eebfa7ae08002fd51e67b58bf6bb
| | | | * | Merge branch 'stable-6.10' into stable-7.0Matthias Sohn2024-12-156-59/+66
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.10: FileSnapshot: fix warnings Optionally.Hard: avoid Optional creation on every use, Pack: fix threading bug getting idx Fix potential NPE in TreeWalk#getFilterCommandDefinition Advertise "agent" capability when using protocol v2 FileSnapshot: silence "Stale file handle" exceptions Change-Id: Ibe8bf9ad43cb1e56a5a5e4f4d9d5818334b2550a
| | | | | * FileSnapshot: fix warningsMatthias Sohn2024-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - comment empty code block - suppress non-translatable text warning Change-Id: Id49b4a56bbe5454edfe1ea8b79ceeaf51ceac370
| | | | | * Optionally.Hard: avoid Optional creation on every use,Martin Fick2024-12-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the getOptional() call created an new Optional for its element, and this appears to be somewhat expensive. During a time when a server is heavily loaded because of a poorly maintained repository with potentially 2K+ pack files, calls to Optionally.ofNullable() from within the getOptional() method appeared extensively in the Stacktrace. Reduce the getOptional() call overhead by storing an already created Optional of the element instead of the element itself. This trades the extra space of one extra reference for a potential speed gain in a hotspot. Since the current users of Optionally.Hard reference objects significantly larger than a single reference (and most users are likely to be, else why would they be using an Optionally?), this is likely a good tradeoff. Change-Id: I7adccc915480cbb97a43dcbe074cfb620888c936 Signed-off-by: Martin Fick <mfick@nvidia.com>
| | | | | * Pack: fix threading bug getting idxMartin Fick2024-12-131-46/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting to Optionally, a threading bug was introduced, fix it. The Optionally class itself is not thread safe, and previously it was being called from idx() without any thread synchronization mechanism. This was because previously the variable which held the cached index was volatile. The Optionally<PackIndex> kept the volatile attribute, but that only synchronizes the reference to the Optionally, and not the element inside the Optionally. A clear() from another thread could thus be missed by the idx() call, potentially allowing the idx() call to interact poorly with the Optionally, potentially even causing a memory leak. To fix this, extend the synchronized inside the idx() method to the entire method. Then, additionally remove the now redundant Optional fetch in idx() and the no longer needed volatile. Change-Id: I6077e1aaed96c53200805b4c87a67afb49c2b373 Signed-off-by: Martin Fick <mfick@nvidia.com>
| | | | | * Fix potential NPE in TreeWalk#getFilterCommandDefinitionNasser Grainawi2024-12-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic6f0fd26153b47b4aeeec105bac431225d9bf8bf
| | | | | * Advertise "agent" capability when using protocol v2Antonio Barone2024-12-102-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "agent" capability was not advertised by the server when executing git-upload-pack over protocol v2. This, in turn, prevented the clients from advertising its client agent too, as documented [1]: "The client may optionally send its own agent string by including the agent capability with a value Y (in the form agent=Y) in its request to the server (but it MUST NOT do so if the server did not advertise the agent capability)." When using jgit with Gerrit this had the effect of preventing the logging of the git client agent in the sshd_log. [1] https://git-scm.com/docs/protocol-v2#_agent Bug: jgit-118 Change-Id: Ifb6ea65fde020425920338f7dd9cc683fed6a4a4
| | | | | * FileSnapshot: silence "Stale file handle" exceptionsMartin Fick2024-12-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes a FileSystemException with "Stale file handle" can be thrown while creating a FileSnapshot, likely because the file or directory was deleted. Since NoSuchFileExceptions are already silenced, and the FileSnapshot already handles all IOExceptions, there is likely no value in seeing this info in the logs, treat these situation the same and silence them also. Change-Id: I922f4edf2d332cd704e60276f41a76df242f281c Signed-off-by: Martin Fick <mfick@nvidia.com>
| * | | | | TestRepository: Deprecate #getDate and use #getInstant insteadIvan Frade2024-12-134-14/+29
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone recomments to use the more modern java.time API instead of the java.util.Date family of classes. This removes all uses of TestRepository#getDate and replace them with getInstant. The method is marked as deprecated and doesn't have any other usages. Change-Id: I84ea63abf781d0d3c7c2724891fd2ef7afc2db1d
| * | | | ArchiveCommandTest: add more detailed message if test failedXenoAmess2024-12-131-1/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I05230cd79d5b744bd1b37a2fb5ba69a8ad6bab62
| * | | | Merge "RevertCommand: use only first line in revert commit message"Matthias Sohn2024-12-134-9/+45
| |\ \ \ \
| | * | | | RevertCommand: use only first line in revert commit messageThomas Wolf2024-12-114-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C git uses only the first line of the title paragraph of the reverted commit to build the title of the revert commit. Align the JGit behavior with that. Since git 2.43.0, a revert of a revert uses a title "Reapply "xxx"" instead of "Revert "Revert "xxx""".[1] This is _not_ implemented in this change. [1] https://github.com/git/git/commit/883cb1b8f86d Bug: jgit-117 Change-Id: I030092c6b9447bb738e6d761af5ce50df58cc6d3
| * | | | | Merge "PushCertificateIdentTest: Add test for the timezone parsing"Ivan Frade2024-12-121-0/+45
| |\ \ \ \ \ | | |/ / / / | |/| | | |