]> source.dussan.org Git - jgit.git/log
jgit.git
3 months agoLib: Fix ssh value for gpg.format throwing an IllegalArgumentException 35/1197035/2
granny [Tue, 2 Jul 2024 22:15:37 +0000 (15:15 -0700)]
Lib: Fix ssh value for gpg.format throwing an IllegalArgumentException

Git version 2.34 and later supports signing commits and tags with SSH keys. This means gpg.format now supports "ssh" as a value.

Change-Id: Iee1e5a68a816bec149a17a73a6916d2884a54163

3 months agoDfsPackFile: Abstract the loading of pack indexes 49/1192949/20
Ivan Frade [Wed, 10 Apr 2024 20:52:56 +0000 (13:52 -0700)]
DfsPackFile: Abstract the loading of pack indexes

DfsPackFile assumes that the indexes are stored in file streams and
their references need to be cached in DFS. This doesn't allow us to
experiment other storage options, like key-value databases. In these
experiments not all indexes are together in the same storage.

Define an interface per index to load it, so implementors can focus on
the specifics of their index. Put them together in the IndexFactory
interface. The implementation of the IndexFactory chooses the right
combination of storages.

At the moment we do this only for primary and reverse
indexes. Following changes can do the same for other indexes.

Change-Id: Icf790d8ba64b34dbe984759f1c6d8ec702554149

3 months agoMerge "PackExtBlockCacheTable: spread extensions over multiple dfs tables"
Ivan Frade [Tue, 30 Jul 2024 15:22:45 +0000 (15:22 +0000)]
Merge "PackExtBlockCacheTable: spread extensions over multiple dfs tables"

4 months agoPackExtBlockCacheTable: spread extensions over multiple dfs tables 64/1196164/25
Laura Hamelin [Fri, 7 Jun 2024 23:11:21 +0000 (16:11 -0700)]
PackExtBlockCacheTable: spread extensions over multiple dfs tables

The existing DfsBlockCache uses a single table for all
extensions (idx, ridx, ...).

This change introduces an implementation of the table
interface that can keep extensions in different cache
tables.
This selects the appropriate cache to use for a specific
PackExt or DfsStreamKey's PackExt type, allowing the
separation of entries from different pack types to help
limit churn in cache caused by entries of differing sizes.

This is especially useful in fine-tuning caches and
influencing interactions by extension type.
For example, a table holding INDEX types only will
not influence evictions of other PackExt types and
vice versa.

The PackExtBlockCacheTable allowing setting the
underlying DfsBlockCacheTables and mappinh directly,
letting users implement and use custom DfsBlockCacheTables.

Change-Id: Icee7b644ef6b600aa473d35645469d6aa1bce345

4 months agoPackObjectSizeIndex: Read all bytes and use the byte[] directly 65/1198165/8
Ivan Frade [Fri, 19 Jul 2024 22:44:15 +0000 (15:44 -0700)]
PackObjectSizeIndex: Read all bytes and use the byte[] directly

The parser reads N integers one by one from the stream, assuming the
InputStream does some ahead reading from storage. We see some very
slow loading of indexes and suspect that this preemptive reading is
not happening. The slow loading can be reproduced in clones, and it
produces higher latencies and locks many threads waiting for the
loading.

Read the whole array from storage in one shot to avoid many small IO
reads. Work directly on the resulting byte[], so there is no need of a
second copy to cast to int/long.

This is how other indexes, like primary or commit graph, work.

Change-Id: I60058606e2c457f60aa4646a1f10ae7b28ce34c2

4 months agoDfsPackFile: Do not set local reverse index ref from cache callback 48/1192948/8
Ivan Frade [Wed, 10 Apr 2024 17:52:44 +0000 (10:52 -0700)]
DfsPackFile: Do not set local reverse index ref from cache callback

The DfsBlockCache loading callback sets the local reference to the
index in the DfsPackFile. This prevents abstracting the loading to
implement it over multiple backends.

Reorg the code so the loadReverseIndex do only the loading, the caller
sets it into DfsBlockCache and the external code sets the local
reference in DfsPackFile.

This is the same pattern we did with the PackIndex in the parent
commit.

Change-Id: I3a395b347965fa7b0e5a3398c4da311dc11c58a1

4 months agoAdd 4.33 target platform for Eclipse 2024-09 43/1197543/1
Matthias Sohn [Mon, 15 Jul 2024 20:57:25 +0000 (22:57 +0200)]
Add 4.33 target platform for Eclipse 2024-09

Change-Id: If234cdba011e0a63cd4a292d66832aa59cce9079

4 months agoMerge changes Id077d58f,Idf61f481
Matthias Sohn [Mon, 15 Jul 2024 20:43:43 +0000 (20:43 +0000)]
Merge changes Id077d58f,Idf61f481

* changes:
  Add worktrees read support
  Merge branch 'stable-7.0'

4 months agoDfsBlockCacheTable: extract stats get* methods to interface 57/1197857/2
Laura Hamelin [Mon, 15 Jul 2024 18:35:56 +0000 (11:35 -0700)]
DfsBlockCacheTable: extract stats get* methods to interface

Having the DfsBlockCacheTable methods extracted to an interface will
allow alternative implementations of BlockCacheStats not tied to the
current implementation.

Change-Id: I534f7998f46253cdb7a68d5ec21d4f42ea586e8e

4 months agoAdd worktrees read support 00/1194900/7
Janne Valkealahti [Thu, 4 Jul 2024 06:44:49 +0000 (07:44 +0100)]
Add worktrees read support

Based on deritative work done in Andre's work in [1].

This change focuses on adding support for reading the repository
state when branches are checked out using git's worktrees.

I've refactored original work by removing all unrelevant
changes which were mostly around refactoring to extract
i.e. constants which mostly created noise for a review.

I've tried to address original review comments:
- Not adding non-behavioral changes
- "HEAD" should get resolved from gitDir
- Reftable recently landed in cgit 2.45,
  see https://github.com/git/git/blob/master/Documentation/RelNotes/2.45.0.txt#L8
  We can add worktree support for reftable in a later change.
- Some new tests to read from a linked worktree which
  is created manually as there's no write support.

[1] https://git.eclipse.org/r/c/jgit/jgit/+/163940/18

Change-Id: Id077d58fb6c09ecb090eb09d5dbc7edc351a581d

4 months agoMerge branch 'stable-7.0' 42/1197542/1
Matthias Sohn [Sun, 14 Jul 2024 20:50:24 +0000 (22:50 +0200)]
Merge branch 'stable-7.0'

* stable-7.0:
  Prepare 7.0.0-SNAPSHOT builds
  JGit v7.0.0.202407101547-m1

Change-Id: Idf61f4816c89718ebf6caa3182681e5c7b96d526

4 months agoPrepare 7.0.0-SNAPSHOT builds 41/1197541/1
Matthias Sohn [Sun, 14 Jul 2024 20:38:03 +0000 (22:38 +0200)]
Prepare 7.0.0-SNAPSHOT builds

Change-Id: I18015892edc81cd42456a6eacb49607930070be9

4 months agoMerge "DfsBlockCacheConfig: support configurations for dfs cache tables per extensions"
Ivan Frade [Fri, 12 Jul 2024 22:12:52 +0000 (22:12 +0000)]
Merge "DfsBlockCacheConfig: support configurations for dfs cache tables per extensions"

4 months agoDfsBlockCacheConfig: support configurations for dfs cache tables per extensions 65/1196165/19
Laura Hamelin [Fri, 7 Jun 2024 23:12:18 +0000 (16:12 -0700)]
DfsBlockCacheConfig: support configurations for dfs cache tables per extensions

Parse configurations for tables containing a set of extensions,
defined in [core "dfs.*"] sections.

Parse configurations for cache tables according to configurations
defined in [core "dfs.*"] git config sections for sets of
extensions. The current [core "dfs"] is the default to any
extension not listed in any other table.

Configuration falls back to the defaults defined in the
DfsBlockCacheConfig.java file when not set on each cache
table configuration.

Sample format for individual cache tables:
In this example:
1. PACK types would go to the "default" table
2. INDEX and BITMAP_INDEX types would go to the
   "multipleExtensionCache" table
3. REFTABLE types would go to the "reftableCache" table

[core "dfs"] // Configuration for the "default" cache table.
  blockSize = 512
  blockLimit = 100
  concurrencyLevel = 5
  (...)

[core "dfs.multipleExtensionCache"]
  packExtensions = "INDEX BITMAP_INDEX"
  blockSize = 512
  blockLimit = 100
  concurrencyLevel = 5
  (...)

[core "dfs.reftableCache"]
  packExtensions = "REFTABLE"
  blockSize = 512
  blockLimit = 100
  concurrencyLevel = 5
  (...)

Change-Id: I0e534e6d78b684832e3d3d269cee2590aa0f1911

4 months agossh: Remove .orig file 59/1197659/1
Ivan Frade [Thu, 11 Jul 2024 22:48:05 +0000 (15:48 -0700)]
ssh: Remove .orig file

This temporal file sneaked into the repo in [1].

[1] https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/1196934

Change-Id: I840244fb237f592bd6ed3075d61085d125d32d7e

4 months agoDfsPackFile: Enable/disable object size index via DfsReaderOptions 23/1196923/7
Ivan Frade [Mon, 1 Jul 2024 19:24:36 +0000 (12:24 -0700)]
DfsPackFile: Enable/disable object size index via DfsReaderOptions

DfsPackFile always uses the object size index if available. That is
the desired final state, but for a safe rollout, we should be able to
disable using the object size index.

Add an option (dfs.useObjectSizeIndex) to enable/disable the usage of
the object size index. False by default.

This changes the default from true to false. It only makes a different
for the DFS stack when writing of the index was explicitely
enabled. This is an optimization, so it shouldn't cause any
regression. Operators can restore previous behaviour setting
"dfs.useObjectSizeIndex" to true.

Change-Id: I44bf5a57e3942a4ecfe66d58bfa9175e99f96fcc

4 months agoJGit v7.0.0.202407101547-m1 35/1197535/1 v7.0.0.202407101547-m1
Matthias Sohn [Wed, 10 Jul 2024 15:46:52 +0000 (17:46 +0200)]
JGit v7.0.0.202407101547-m1

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I80b799fc8f8d349ec3edb156e81593233013ae8b

4 months agoMerge changes I2e10c428,I082c3726,I20622430,I040ccaff
Matthias Sohn [Wed, 3 Jul 2024 14:59:28 +0000 (14:59 +0000)]
Merge changes I2e10c428,I082c3726,I20622430,I040ccaff

* changes:
  Update org.eclipse.jdt.ecj to 3.38.0
  Update bytebuddy to 1.14.17
  Update jetty to 12.0.10
  Update org.apache.sshd to 2.13.1

4 months agoRepoProject: read the 'dest-branch' attribute of a project 22/1196922/2 69/1037769/edit-1196922/1
Kaushik Lingarkar [Fri, 28 Jun 2024 17:02:05 +0000 (10:02 -0700)]
RepoProject: read the 'dest-branch' attribute of a project

The manifest spec [1] defines a "dest-branch" attribute. Parse its
value and store it in the RepoProject. Also, create a getter/setter
for dest-branch.

[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Element-project

Change-Id: I8ad83b0fec59d2b0967864e4de4fefde4ab971ff

4 months agoUpdate org.eclipse.jdt.ecj to 3.38.0 37/1196937/1
Matthias Sohn [Mon, 1 Jul 2024 22:35:36 +0000 (00:35 +0200)]
Update org.eclipse.jdt.ecj to 3.38.0

Change-Id: I2e10c428991801e3da5ce1851eff23e508c2bd10

4 months agoUpdate bytebuddy to 1.14.17 36/1196936/1
Matthias Sohn [Mon, 1 Jul 2024 22:26:44 +0000 (00:26 +0200)]
Update bytebuddy to 1.14.17

Change-Id: I082c3726aa1b4f5bf97ac619b8265c734fc1d196

4 months agoUpdate jetty to 12.0.10 35/1196935/1
Matthias Sohn [Mon, 1 Jul 2024 22:12:43 +0000 (00:12 +0200)]
Update jetty to 12.0.10

Change-Id: I20622430e766cc856e7d62483983d3466384eef4

4 months agoUpdate org.apache.sshd to 2.13.1 34/1196934/2
Matthias Sohn [Mon, 1 Jul 2024 21:10:10 +0000 (23:10 +0200)]
Update org.apache.sshd to 2.13.1

Change-Id: I040ccaffba337b252d731fe9661209818b5b63e3

4 months agoMake RepoProject#setUpstream public 21/1196921/1
Kaushik Lingarkar [Fri, 28 Jun 2024 01:05:30 +0000 (18:05 -0700)]
Make RepoProject#setUpstream public

Applications using JGit such as Gerrit plugins may have their own
manifest parsers. They can start using RepoProject to some extent
with this change. Eventually, they can be migrated to use the
ManifestParser in JGit, however until then, this change can help
make the migration incremental.

Change-Id: I6a32d4f4622c3842eedf7873cdfed2f1ca998f6f

4 months agoMerge "Merge branch 'next'"
Matthias Sohn [Sun, 30 Jun 2024 09:31:52 +0000 (09:31 +0000)]
Merge "Merge branch 'next'"

4 months agoMerge "DfsPackFile: Do not set primery index local ref from cache callback"
Ivan Frade [Fri, 28 Jun 2024 22:56:02 +0000 (22:56 +0000)]
Merge "DfsPackFile: Do not set primery index local ref from cache callback"

4 months agoDfsPackFile: Do not set primery index local ref from cache callback 02/1192802/8
Ivan Frade [Tue, 9 Apr 2024 20:25:43 +0000 (13:25 -0700)]
DfsPackFile: Do not set primery index local ref from cache callback

DfsPackFile assumes the indices are in pack streams, but we would like
to consider other formats and storage. Currently, the local ref in the
DfsPackFile to the index is set in the cache loading callback, which
prevents abstracting the loading.

Reorganize the code so: the loadPackIndex function just parses the bytes
returning a reference and the caller sets the loaded index in the local
ref and DfsBlockCache.

We will follow this pattern with other indices in follow-up
changes. Note that although DfsPackFile is used only in one thread,
the loading in DfsBlockCache can happen from multiple threads
concurrently and we want to keep only one ref around.

Change-Id: Ie99de6c80784225484c0f99c51caa44c6a372c45

4 months agoMigrate to python 3 59/1196659/2
Daniele Sassoli [Mon, 24 Jun 2024 08:16:57 +0000 (09:16 +0100)]
Migrate to python 3

Given that on most systems Python is still linked to the Python 2.7,
switch explicitly to using Python 3.

Python 2.7 was discontinued on January 1, 2020: [1].

Moreover, there is PEP recommending to use python3 in the shebang: [2].

[1] https://www.python.org/doc/sunset-python-2
[2] https://www.python.org/dev/peps/pep-0394

Change-Id: Idd3ed567b0384c6ff0a6121ad736f8af4c0f85e0

5 months ago[releng] Bump japicmp base version to 6.10.0.202406032230-r 22/1196322/1
Thomas Wolf [Fri, 14 Jun 2024 15:49:22 +0000 (17:49 +0200)]
[releng] Bump japicmp base version to 6.10.0.202406032230-r

Change-Id: If34ad4986c1764015d5f86e185880e2eda32d90e
Signed-off-by: Thomas Wolf <twolf@apache.org>
5 months agoRepoProject: Fix @since tag of new methods 84/1195684/2
Matthias Sohn [Tue, 4 Jun 2024 15:54:52 +0000 (17:54 +0200)]
RepoProject: Fix @since tag of new methods

The change Ia50b85b95bfd3710f9fbda2050be5950dd686941 didn't reach the
6.10 release hence update the API version to 7.0.

Change-Id: If25121797d2955e1e741eec465f69a482af353d1

5 months agoMerge "Introduce GPG_SIGNATURE_PREFIX constant"
Matthias Sohn [Sat, 8 Jun 2024 12:30:03 +0000 (12:30 +0000)]
Merge "Introduce GPG_SIGNATURE_PREFIX constant"

5 months agoIntroduce GPG_SIGNATURE_PREFIX constant 66/1193866/4
Luca Milanesio [Fri, 26 Apr 2024 00:20:25 +0000 (01:20 +0100)]
Introduce GPG_SIGNATURE_PREFIX constant

Change-Id: If6cabae76d7b38ce26fca534da6fe13973ebbf4f

5 months agoRepoCommand: Add error to ManifestErrorException 05/1195905/1
Ivan Frade [Thu, 6 Jun 2024 19:01:04 +0000 (12:01 -0700)]
RepoCommand: Add error to ManifestErrorException

RepoCommand wraps errors in the manifest in a ManifestErrorException
with a fixed message ("Invalid manifest"). Callers like supermanifest
plugin cannot return a meaningful error to the client without digging
into the cause chain.

Add the actual error message to the ManifestErrorException, so callers
can rely on #getMessage() to see what happens.

Change-Id: I18be17fb5e4aaaf4f11ebd627580a91fe330eaca

5 months agoFix broken links to SCM and issue tracker in pom.xml 65/1195765/1
Antonin Delpeuch [Wed, 5 Jun 2024 08:17:48 +0000 (10:17 +0200)]
Fix broken links to SCM and issue tracker in pom.xml

Change-Id: I34537d42dedfd0a20363cc791722e28c779524b4
Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
5 months agoMerge branch 'next' 83/1195683/1
Matthias Sohn [Tue, 4 Jun 2024 15:18:14 +0000 (17:18 +0200)]
Merge branch 'next'

* next:
  Bump jetty version to 12.0.9 and servlet-api to 6.0
  Bump jetty version to 11.0.20
  Update minimum Java version to 17
  Prepare 7.0.0-SNAPSHOT builds

Change-Id: I99c02f19a580101d34a5b4f9ab4daac33c755b89

5 months agoPrepare 7.0.0-SNAPSHOT builds 81/1195681/1
Matthias Sohn [Tue, 4 Jun 2024 14:09:27 +0000 (16:09 +0200)]
Prepare 7.0.0-SNAPSHOT builds

Change-Id: I78b2779e4e5f34978cb9f1e8fa1dfe6dd5597c31

5 months agoMerge branch 'stable-6.10' 78/1195678/1
Matthias Sohn [Tue, 4 Jun 2024 07:10:32 +0000 (09:10 +0200)]
Merge branch 'stable-6.10'

* stable-6.10:
  Prepare 6.10.1-SNAPSHOT builds
  JGit v6.10.0.202406032230-r
  JGit v6.10.0.202406032110-r
  Prepare 6.10.0-SNAPSHOT builds
  JGit v6.10.0.202405290101-rc1
  Revert "Update tycho to 4.0.8"
  JGit v6.10.0.202405282244-rc1
  Prepare 6.10.0-SNAPSHOT builds
  JGit v6.10.0.202405212237-m3

Change-Id: I777bfde90d43bece4278d42017feb835f76fbf5f

5 months agoPrepare 6.10.1-SNAPSHOT builds 77/1195677/1
Matthias Sohn [Tue, 4 Jun 2024 07:08:00 +0000 (09:08 +0200)]
Prepare 6.10.1-SNAPSHOT builds

Change-Id: I3384e7405cadf063e7b0dd25468a8651c45628ac

5 months agoJGit v6.10.0.202406032230-r 75/1195675/1 v6.10.0.202406032230-r
Matthias Sohn [Mon, 3 Jun 2024 22:29:39 +0000 (00:29 +0200)]
JGit v6.10.0.202406032230-r

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Id188a6cdc2db63c961f0b9338e6ae56d58853dff

5 months agoJGit v6.10.0.202406032110-r 74/1195674/1 v6.10.0.202406032110-r
Matthias Sohn [Mon, 3 Jun 2024 21:10:25 +0000 (23:10 +0200)]
JGit v6.10.0.202406032110-r

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I3128b2e4bbbed97adde90f7a47e15175e63e97f5

5 months agoPrepare 6.10.0-SNAPSHOT builds 32/1195332/1
Matthias Sohn [Sun, 2 Jun 2024 08:03:19 +0000 (10:03 +0200)]
Prepare 6.10.0-SNAPSHOT builds

Change-Id: I64f6d6a0599cbab462dca236c00e6f3314b2a810

5 months agoCommitGraphWriter: use ANY_DIFF instead of idEquals inside next() 65/1195565/3
Ivan Frade [Fri, 31 May 2024 19:20:07 +0000 (12:20 -0700)]
CommitGraphWriter: use ANY_DIFF instead of idEquals inside next()

Calculating the paths modified in a commit respect its parents is
taking undue amount of time in big trees.

Use ANY_DIFF filter, instead of #idEquals() inside the #next(). This
shorcuts the tree browsing earlier.

Change-Id: I318eee3ae817b7b9004d60bdb8d0f1bf19b9962d

5 months agoCommitGraphWriter: Move path diff calculation to its own class 64/1195564/3
Ivan Frade [Fri, 31 May 2024 19:12:57 +0000 (12:12 -0700)]
CommitGraphWriter: Move path diff calculation to its own class

To verify that we have the right paths between commits we are writing
the bloom filters, reading them and querying. The path diff
calculation is tricky enough for correctness and performance that
should be tested on its own.

Move the path diff calculation to its own class, so we can test it on
its own.

This is a noop refactor so we can verify later the steps taken in the
walk.

Change-Id: Ifbdcb752891c4adb08553802f87287de1155bb7c

5 months agoRepoCommand: Copy manifest upstream into .gitmodules ref field 29/1195529/2
Ivan Frade [Thu, 30 May 2024 21:04:56 +0000 (14:04 -0700)]
RepoCommand: Copy manifest upstream into .gitmodules ref field

Project entries in the manifest with a specific sha1 as revision can
use the "upstream" field to report the ref pointing to that sha1. This
information is very valuable for downstream tools, as they can limit
their search for a blob to the relevant ref, but it gets lost in the
translation to .gitmodules.

Save the value of the upstream field when available/relevant in the
ref field of the .gitmodules entry.

Change-Id: I14a2395925618d5e6b34be85466e32f5ef8fbf6e

5 months agoRepoProject: read the "upstream" attribute of a project 28/1195528/2
Ivan Frade [Thu, 30 May 2024 17:56:20 +0000 (10:56 -0700)]
RepoProject: read the "upstream" attribute of a project

The manifest spec [1] defines the "upstream" attribute: "name of the
git ref in which a sha1 can be found", when the revision is a
sha1. The parser is ignoring it, but RepoCommand could use it to
populate the "ref=" field of pinned submodules.

Parse the value and store it in the RepoProject.

RepoProject is public API and the current constructors are not
telescopic, so we cannot just add a new constructor with an extra
argument. Use plain getter/setters.j

[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Element-project

Change-Id: Ia50b85b95bfd3710f9fbda2050be5950dd686941

5 months agoJGit v6.10.0.202405290101-rc1 29/1195329/1 v6.10.0.202405290101-rc1
Matthias Sohn [Wed, 29 May 2024 01:01:38 +0000 (03:01 +0200)]
JGit v6.10.0.202405290101-rc1

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ie3d08213e00fcfe1fc34a39021dd99f27e0abc1f

5 months agoRevert "Update tycho to 4.0.8" 28/1195328/1
Matthias Sohn [Wed, 29 May 2024 01:00:53 +0000 (03:00 +0200)]
Revert "Update tycho to 4.0.8"

This reverts commit 76ce6d91a2e07fdfcbfc8df6970c9e98a98e36a0.

Change-Id: I1f8df6562304c64b192da11538c02230f0084a43

5 months agoJGit v6.10.0.202405282244-rc1 26/1195326/1 v6.10.0.202405282244-rc1
Matthias Sohn [Tue, 28 May 2024 22:44:17 +0000 (00:44 +0200)]
JGit v6.10.0.202405282244-rc1

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ia525790e0b4c9011b29768d2b9727cb48b21ba84

5 months agoMerge branch 'master' into stable-6.10 24/1195324/2
Matthias Sohn [Tue, 28 May 2024 22:20:58 +0000 (00:20 +0200)]
Merge branch 'master' into stable-6.10

* master:
  PatchApplier.Result.Error: mark fields final
  Update tycho to 4.0.8
  Update to org.assertj:assertj-core:3.26.0
  PatchApplier: Set a boolean on the result if conflict markers were added
  PatchApplier: Add test for conflict markers on a deleted file
  Update org.apache.commons:commons-compress to 1.26.2
  Remove version override of commons-codec
  Update spring-boot-maven-plugin to 2.7.18
  Update jacoco-maven-plugin to 0.8.12
  Update maven-source-plugin to 3.3.1
  Update maven-shade-plugin to 3.5.3
  Update  maven-pmd-plugin to 3.22.0
  Update cyclonedx-maven-plugin to 2.8.0
  Update build-helper-maven-plugin to 3.6.0
  Update maven-site-plugin to 4.0.0-M14
  Update maven-jar-plugin to 3.4.1
  Update maven-install-plugin to 3.1.2
  Update maven-deploy-plugin to 3.1.2
  Update maven-artifact-plugin to 3.5.1
  Update tycho to 4.0.7 and set minimum maven version to 3.9.0
  Update git-commit-id-maven-plugin to 8.0.2
  Update spotbugs-maven-plugin to 4.8.5.0
  Update japicmp-maven-plugin to 0.21.2
  Update maven-compiler-plugin to 3.13.0
  Update bytebuddy to 1.14.16
  Update com.google.code.gson:gson to 2.11.0

Change-Id: I8245cb32a27329dfdd05e6cb80be846ecf62b800

5 months agoPatchApplier.Result.Error: mark fields final 14/1195314/6
Matthias Sohn [Mon, 27 May 2024 16:22:29 +0000 (18:22 +0200)]
PatchApplier.Result.Error: mark fields final

Fields of an Error instance shouldn't be modifiable after its creation.
Adapt tests which were setting hh to null to skip asserting it.

Change-Id: I0f55c1d5cd529aa510029054e6f05bd2637d1bca

5 months agoUpdate tycho to 4.0.8 23/1195323/1
Matthias Sohn [Mon, 27 May 2024 21:02:28 +0000 (23:02 +0200)]
Update tycho to 4.0.8

Change-Id: Idc4c95e643ea46c2b2e33f9a60b0477185429588

5 months agoUpdate to org.assertj:assertj-core:3.26.0 09/1195309/2
Ed Merks [Mon, 27 May 2024 15:49:07 +0000 (17:49 +0200)]
Update to org.assertj:assertj-core:3.26.0

Change-Id: I3f0131cd168ba9c814341416198f955a6d5b340f

5 months agoPatchApplier: Set a boolean on the result if conflict markers were added 05/1195305/4
Patrick Hiesel [Mon, 27 May 2024 14:11:40 +0000 (16:11 +0200)]
PatchApplier: Set a boolean on the result if conflict markers were added

This will let callers show a different error message or mark the
state as conflicting.

Change-Id: Id8eea614b6b8d54c62b49ffbac90599e6f4c5efa

5 months agoPatchApplier: Add test for conflict markers on a deleted file 91/1195291/2
Patrick Hiesel [Mon, 27 May 2024 08:16:34 +0000 (10:16 +0200)]
PatchApplier: Add test for conflict markers on a deleted file

For deleted files, we want to keep erroring out even if conflicts
are allowed for the apply patch logic. The resulting file would
otherwise only consist of the patch.

Change-Id: I18defa627ad2223a3a917d2b0ee4189396732533

6 months agoUpdate org.apache.commons:commons-compress to 1.26.2 82/1195182/2
Ed Merks [Fri, 24 May 2024 15:41:55 +0000 (17:41 +0200)]
Update org.apache.commons:commons-compress to 1.26.2

commons-compress 1.26.0 added commons-lang3 as a transitive dependency.
Hence add it to the target platform, p2 repository and bazel build.

Change-Id: Iac5ca095d3e93176e21364a66a29c5e533168e16

6 months agoMerge changes I075ae7fa,I5fb12281,I420f2408,I71d1fb6c,I9013309b, ...
Matthias Sohn [Sat, 25 May 2024 21:06:04 +0000 (21:06 +0000)]
Merge changes I075ae7fa,I5fb12281,I420f2408,I71d1fb6c,I9013309b, ...

* changes:
  Update spring-boot-maven-plugin to 2.7.18
  Update jacoco-maven-plugin to 0.8.12
  Update maven-source-plugin to 3.3.1
  Update maven-shade-plugin to 3.5.3
  Update  maven-pmd-plugin to 3.22.0
  Update cyclonedx-maven-plugin to 2.8.0
  Update build-helper-maven-plugin to 3.6.0
  Update maven-site-plugin to 4.0.0-M14
  Update maven-jar-plugin to 3.4.1
  Update maven-install-plugin to 3.1.2
  Update maven-deploy-plugin to 3.1.2
  Update maven-artifact-plugin to 3.5.1
  Update tycho to 4.0.7 and set minimum maven version to 3.9.0
  Update git-commit-id-maven-plugin to 8.0.2

6 months agoRemove version override of commons-codec 37/1195237/1
Thomas Wolf [Sat, 25 May 2024 15:03:34 +0000 (17:03 +0200)]
Remove version override of commons-codec

Since commit 8164155b the commons-codec version is pinned in the parent
POM's dependency management. Remove the version specification in
org.eclipse.jgit/pom.xml.

Also give the package-import in the MANIFEST.MF an upper bound.

Change-Id: I2785a87cf77d6df110f57a0cb939dbc9772b8ee6
Signed-off-by: Thomas Wolf <twolf@apache.org>
6 months agoUpdate spring-boot-maven-plugin to 2.7.18 47/1195147/2
Matthias Sohn [Thu, 23 May 2024 22:30:02 +0000 (00:30 +0200)]
Update spring-boot-maven-plugin to 2.7.18

Change-Id: I075ae7fa40e6c883897c8a7ec5ce422b4e808ef6

6 months agoUpdate jacoco-maven-plugin to 0.8.12 46/1195146/2
Matthias Sohn [Thu, 23 May 2024 22:27:11 +0000 (00:27 +0200)]
Update jacoco-maven-plugin to 0.8.12

Change-Id: I5fb1228199159c82d426dcb22aabd39411f381c7

6 months agoUpdate maven-source-plugin to 3.3.1 45/1195145/2
Matthias Sohn [Thu, 23 May 2024 22:25:55 +0000 (00:25 +0200)]
Update maven-source-plugin to 3.3.1

Change-Id: I420f24086948b28328f7120c1b22f4de33da0e78

6 months agoUpdate maven-shade-plugin to 3.5.3 44/1195144/2
Matthias Sohn [Thu, 23 May 2024 22:25:12 +0000 (00:25 +0200)]
Update maven-shade-plugin to 3.5.3

Change-Id: I71d1fb6c6e7ce8ab121e77ffbc05b14fd47879f1

6 months agoUpdate maven-pmd-plugin to 3.22.0 43/1195143/2
Matthias Sohn [Thu, 23 May 2024 22:24:11 +0000 (00:24 +0200)]
Update  maven-pmd-plugin to 3.22.0

Change-Id: I9013309b218fafec7d1e70c98fb32a683ecc7a0b

6 months agoUpdate cyclonedx-maven-plugin to 2.8.0 42/1195142/2
Matthias Sohn [Thu, 23 May 2024 22:22:20 +0000 (00:22 +0200)]
Update cyclonedx-maven-plugin to 2.8.0

Change-Id: If26a3d7f26d3e46bf22a23f590cd289baaaa167f

6 months agoUpdate build-helper-maven-plugin to 3.6.0 41/1195141/2
Matthias Sohn [Thu, 23 May 2024 22:21:27 +0000 (00:21 +0200)]
Update build-helper-maven-plugin to 3.6.0

Change-Id: I3bb8f751c8c7ab630eb8b4eab3e24f354d1a10e7

6 months agoUpdate maven-site-plugin to 4.0.0-M14 40/1195140/2
Matthias Sohn [Thu, 23 May 2024 22:20:26 +0000 (00:20 +0200)]
Update maven-site-plugin to 4.0.0-M14

Change-Id: I0487adb0d3c7fef0841e3fb200d9df78ee27e9e4

6 months agoUpdate maven-jar-plugin to 3.4.1 39/1195139/2
Matthias Sohn [Thu, 23 May 2024 22:19:37 +0000 (00:19 +0200)]
Update maven-jar-plugin to 3.4.1

Change-Id: I695e424a44cac2119656ceacfbe1a7abb5f4d7b5

6 months agoUpdate maven-install-plugin to 3.1.2 38/1195138/2
Matthias Sohn [Thu, 23 May 2024 22:18:46 +0000 (00:18 +0200)]
Update maven-install-plugin to 3.1.2

Change-Id: Id322cef408ce9ddac3febc8963794f5958c06d3e

6 months agoUpdate maven-deploy-plugin to 3.1.2 37/1195137/2
Matthias Sohn [Thu, 23 May 2024 22:18:04 +0000 (00:18 +0200)]
Update maven-deploy-plugin to 3.1.2

Change-Id: I60d5aae001583671a01a8c38e98e36a7293b34eb

6 months agoUpdate maven-artifact-plugin to 3.5.1 36/1195136/2
Matthias Sohn [Thu, 23 May 2024 22:16:26 +0000 (00:16 +0200)]
Update maven-artifact-plugin to 3.5.1

Change-Id: I845e101876543a6b5fb197eefa7e73029b9e4809

6 months agoUpdate tycho to 4.0.7 and set minimum maven version to 3.9.0 35/1195135/2
Matthias Sohn [Thu, 23 May 2024 22:11:47 +0000 (00:11 +0200)]
Update tycho to 4.0.7 and set minimum maven version to 3.9.0

which is required by tycho 4.0.7.

Change-Id: I7ed1bda89c8712a0a1bb47bdf77e4b7f9f66c039

6 months agoUpdate git-commit-id-maven-plugin to 8.0.2 34/1195134/2
Matthias Sohn [Thu, 23 May 2024 22:09:04 +0000 (00:09 +0200)]
Update git-commit-id-maven-plugin to 8.0.2

Change-Id: I280b649a9d4bcaf829c7949a99c129d107eec822

6 months agoUpdate spotbugs-maven-plugin to 4.8.5.0 92/1194992/1
Matthias Sohn [Wed, 22 May 2024 21:37:17 +0000 (23:37 +0200)]
Update spotbugs-maven-plugin to 4.8.5.0

Change-Id: Icc7d5840536dd9f4ef4137c8e5ec35f687c3de4a

6 months agoUpdate japicmp-maven-plugin to 0.21.2 91/1194991/1
Matthias Sohn [Wed, 22 May 2024 21:35:24 +0000 (23:35 +0200)]
Update japicmp-maven-plugin to 0.21.2

Change-Id: Ifcab62d1ed7837258c257cac3a862668fe9db923

6 months agoUpdate maven-compiler-plugin to 3.13.0 90/1194990/1
Matthias Sohn [Wed, 22 May 2024 21:32:48 +0000 (23:32 +0200)]
Update maven-compiler-plugin to 3.13.0

Change-Id: I282498fee64bcfb542a063413b55821efc77302b

6 months agoUpdate bytebuddy to 1.14.16 88/1194988/1
Matthias Sohn [Wed, 22 May 2024 17:13:28 +0000 (19:13 +0200)]
Update bytebuddy to 1.14.16

Change-Id: Iaf958d05f31cd03d1f4d7ba64610abdee85bf63d

6 months agoUpdate com.google.code.gson:gson to 2.11.0 32/1195032/2
Ed Merks [Wed, 22 May 2024 06:46:31 +0000 (08:46 +0200)]
Update com.google.code.gson:gson to 2.11.0

Change-Id: Ibbd8e1675e3b8c67af0e13de16c470db108d3a0f

6 months agoPrepare 6.10.0-SNAPSHOT builds 86/1194986/1
Matthias Sohn [Tue, 21 May 2024 23:41:44 +0000 (01:41 +0200)]
Prepare 6.10.0-SNAPSHOT builds

Change-Id: I5b6d5c23d504fac386ae04c42b735152fbbcd7ae

6 months agoJGit v6.10.0.202405212237-m3 84/1194984/1 v6.10.0.202405212237-m3
Matthias Sohn [Tue, 21 May 2024 22:37:41 +0000 (00:37 +0200)]
JGit v6.10.0.202405212237-m3

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I4efb1066ee4146d0455c39cc07879533b8933e43

6 months agoUpdate Apache commons-logging to 1.3.2 79/1194979/2
Matthias Sohn [Mon, 20 May 2024 21:25:23 +0000 (23:25 +0200)]
Update Apache commons-logging to 1.3.2

Stop bundling the source bundle since the upstream artifact doesn't have
a valid OSGi manifest.

Change-Id: I819685f7f6d6ebcf8f179dd3133e7fc809bba392

6 months agoUpdate jetty to 10.0.21 78/1194978/1
Matthias Sohn [Mon, 20 May 2024 21:15:36 +0000 (23:15 +0200)]
Update jetty to 10.0.21

Change-Id: I1d7bf0fb66d329aad24b512bed082e3f74a5b2a8

6 months agoUpdate Apache commons-io to 2.16.1 77/1194977/1
Matthias Sohn [Mon, 20 May 2024 21:06:06 +0000 (23:06 +0200)]
Update Apache commons-io to 2.16.1

Change-Id: Ia8dec10b4d487611a9cad2268764fa53fcd35c47

6 months agoUpdate Apache commons-codec to 1.17.0 76/1194976/1
Matthias Sohn [Mon, 20 May 2024 20:55:39 +0000 (22:55 +0200)]
Update Apache commons-codec to 1.17.0

Change-Id: Ife807c38cd163a75a70e91610127b01807be2f68

6 months agoWalkFetchConnection: Remove marked packs on all function exits 56/1194856/4
Ivan Frade [Thu, 16 May 2024 19:28:53 +0000 (12:28 -0700)]
WalkFetchConnection: Remove marked packs on all function exits

[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

6 months agoMerge "Do not use ArrayList when there will be deletions"
Ivan Frade [Thu, 16 May 2024 16:24:01 +0000 (16:24 +0000)]
Merge "Do not use ArrayList when there will be deletions"

6 months agoDo not use ArrayList when there will be deletions 12/1194812/7
jackdt@google.com [Wed, 15 May 2024 21:41:57 +0000 (14:41 -0700)]
Do not use ArrayList when there will be deletions

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

6 months agoMerge changes I12e4d0fd,I082ffb20
Matthias Sohn [Thu, 16 May 2024 11:13:29 +0000 (11:13 +0000)]
Merge changes I12e4d0fd,I082ffb20

* changes:
  Remove unused API problem filters
  Fix warning "Redundant specification of type arguments <Object>"

6 months agoPatchApplierTest: remove unused import 25/1194625/1
Matthias Sohn [Wed, 15 May 2024 20:55:30 +0000 (22:55 +0200)]
PatchApplierTest: remove unused import

Change-Id: Ie3ac82a8160c605e27ee3167e3640cd76b1b2a76

6 months agoMerge "Allow applying a patch with conflicts"
Matthias Sohn [Wed, 15 May 2024 19:45:15 +0000 (19:45 +0000)]
Merge "Allow applying a patch with conflicts"

6 months agoAllow applying a patch with conflicts 80/200480/10
Patrick Hiesel [Fri, 10 Mar 2023 15:50:37 +0000 (16:50 +0100)]
Allow applying a patch with conflicts

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

6 months agoRemove unused API problem filters 24/1194624/1
Matthias Sohn [Tue, 14 May 2024 14:33:04 +0000 (16:33 +0200)]
Remove unused API problem filters

Change-Id: I12e4d0fd48b5b7420d421874c8d63caed9628266

6 months agoFix warning "Redundant specification of type arguments <Object>" 23/1194623/2
Matthias Sohn [Tue, 14 May 2024 14:25:43 +0000 (16:25 +0200)]
Fix warning "Redundant specification of type arguments <Object>"

Use a lambda to fix this and make the code easier to read.

Change-Id: I082ffb2073f86d21deb4b51a24e53de9371b765e

6 months agoAdd 4.32 target platform 22/1194622/1
Matthias Sohn [Tue, 14 May 2024 14:18:24 +0000 (16:18 +0200)]
Add 4.32 target platform

and
- add orbit-4.32
- update objenesis to 3.4

Change-Id: Ia9df427eb3c97f867caaffbc92674fb750433aad

6 months agoMerge "sshd: fix IdentiesOnly if SSH agent is enabled and has keys"
Matthias Sohn [Tue, 14 May 2024 12:32:43 +0000 (12:32 +0000)]
Merge "sshd: fix IdentiesOnly if SSH agent is enabled and has keys"

6 months agosshd: fix IdentiesOnly if SSH agent is enabled and has keys 67/1194667/1
Thomas Wolf [Mon, 6 May 2024 17:32:12 +0000 (19:32 +0200)]
sshd: fix IdentiesOnly if SSH agent is enabled and has keys

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>
6 months agoUpdate mina-sshd to 2.12.1 21/1194621/2
Matthias Sohn [Mon, 13 May 2024 00:06:38 +0000 (02:06 +0200)]
Update mina-sshd to 2.12.1

Change-Id: I3f7b76243af0add3ee66a7f808a73f10d01a7627

6 months agoUpdate byte-buddy to 1.14.15 20/1194620/2
Matthias Sohn [Sun, 12 May 2024 23:52:12 +0000 (01:52 +0200)]
Update byte-buddy to 1.14.15

Change-Id: Ie5192a7c02c60e26c7c76f618b05f24307afcc63

6 months agoUpdate org.apache.commons:commons-compress to 1.26.1 19/1194619/2
Matthias Sohn [Sun, 12 May 2024 23:40:59 +0000 (01:40 +0200)]
Update org.apache.commons:commons-compress to 1.26.1

Change-Id: I53a0308145d1caa62a09b2262b721d155b62a4b8

6 months agoUpdate mockito to 5.12.0 18/1194618/2
Matthias Sohn [Sun, 12 May 2024 23:31:12 +0000 (01:31 +0200)]
Update mockito to 5.12.0

Change-Id: Ia346c37673369ee497ab4797aa96d82fe51f84c0

6 months agoUpdate org.eclipse.jdt:ecj to 3.37.0 17/1194617/2
Matthias Sohn [Sun, 12 May 2024 23:10:33 +0000 (01:10 +0200)]
Update org.eclipse.jdt:ecj to 3.37.0

Change-Id: Iedc5cd96f85367546f0b15df05ac242a38af3b16

6 months agoUpdate groovy to 4.0.21 15/1194615/2
Matthias Sohn [Sun, 12 May 2024 22:58:15 +0000 (00:58 +0200)]
Update groovy to 4.0.21

Change-Id: I7eb29ba080f6c2e3f4097977adf48b246c4a7822