]> source.dussan.org Git - jgit.git/log
jgit.git
2 weeks ago[errorprone] bc: Remove unused SExprParser#parseSecretKey 40/1203640/1
Ivan Frade [Tue, 5 Nov 2024 23:03:26 +0000 (15:03 -0800)]
[errorprone] bc: Remove unused SExprParser#parseSecretKey

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

2 weeks agoUpdate bouncycastle to 1.79 45/1203545/2
Matthias Sohn [Tue, 5 Nov 2024 01:00:24 +0000 (02:00 +0100)]
Update bouncycastle to 1.79

Change-Id: Ib81d73075ebc9dcdc73aacf30fa02ad56a502d51

2 weeks agoUpdate bytebuddy to 1.15.10 44/1203544/1
Matthias Sohn [Tue, 5 Nov 2024 00:42:16 +0000 (01:42 +0100)]
Update bytebuddy to 1.15.10

Change-Id: I49cd5bedd86601380a26f7a7213fc78ebd091393

2 weeks agoMerge branch 'stable-7.1' 43/1203543/1
Matthias Sohn [Tue, 5 Nov 2024 00:29:08 +0000 (01:29 +0100)]
Merge branch 'stable-7.1'

* 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

2 weeks agoAdd missing @since 7.1 to UploadPack#implies 42/1203542/1
Matthias Sohn [Tue, 5 Nov 2024 00:28:14 +0000 (01:28 +0100)]
Add missing @since 7.1 to UploadPack#implies

Change-Id: Iabbe1f18a5022b4669a3352493c6fd35920ef25f

2 weeks agoMerge branch 'stable-7.0' into stable-7.1 41/1203541/1
Matthias Sohn [Tue, 5 Nov 2024 00:21:05 +0000 (01:21 +0100)]
Merge branch 'stable-7.0' into stable-7.1

* stable-7.0:
  ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider
  Add Union merge strategy support

Change-Id: I15674134f4c73ac2de514d4fac4a36fca7ed7b07

2 weeks agoMerge branch 'stable-6.10' into stable-7.0 40/1203540/1
Matthias Sohn [Tue, 5 Nov 2024 00:13:36 +0000 (01:13 +0100)]
Merge branch 'stable-6.10' into stable-7.0

* stable-6.10:
  ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider
  Add Union merge strategy support

Change-Id: I0d768d793effd1deabb4807446a4f8c10a82ad74

2 weeks agoResolveMerger: Allow setting the TreeWalk AttributesNodeProvider 78/1203278/4
Nasser Grainawi [Tue, 29 Oct 2024 23:22:15 +0000 (17:22 -0600)]
ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider

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

2 weeks agoAdd Union merge strategy support 79/1203079/4
Nasser Grainawi [Tue, 22 Oct 2024 02:26:35 +0000 (20:26 -0600)]
Add Union merge strategy support

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

2 weeks agoMerge "DfsPackCompactor: write object size index"
Ivan Frade [Mon, 4 Nov 2024 20:05:10 +0000 (20:05 +0000)]
Merge "DfsPackCompactor: write object size index"

2 weeks agoDfsPackCompactor: write object size index 68/1203468/4
Ivan Frade [Fri, 1 Nov 2024 15:58:27 +0000 (08:58 -0700)]
DfsPackCompactor: write object size index

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

2 weeks ago[errorprone] BaseRepositoryBuilder: Use #split(sep, limit) 75/1203475/1
Ivan Frade [Thu, 31 Oct 2024 19:50:00 +0000 (12:50 -0700)]
[errorprone] BaseRepositoryBuilder: Use #split(sep, limit)

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

2 weeks ago[errorprone] Remove deprecated security manager 02/1203402/2
Ivan Frade [Thu, 31 Oct 2024 19:17:09 +0000 (12:17 -0700)]
[errorprone] Remove deprecated security manager

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

2 weeks ago[errorprone] RefDatabase: #getConflictingNames immutable return 03/1203403/1
Ivan Frade [Thu, 31 Oct 2024 19:55:31 +0000 (12:55 -0700)]
[errorprone] RefDatabase: #getConflictingNames immutable return

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

2 weeks agoMerge "DfsGarbageCollector: Add setter for reflog expiration time."
Ivan Frade [Thu, 31 Oct 2024 19:17:53 +0000 (19:17 +0000)]
Merge "DfsGarbageCollector: Add setter for reflog expiration time."

2 weeks agoDfsGarbageCollector: Add setter for reflog expiration time. 18/1203218/10
Saril Sudhakaran [Tue, 29 Oct 2024 05:17:01 +0000 (00:17 -0500)]
DfsGarbageCollector: Add setter for reflog expiration time.

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

2 weeks agoMerge "[errorprone] HttpConnection: Add missing summary in java"
Ivan Frade [Thu, 31 Oct 2024 16:50:18 +0000 (16:50 +0000)]
Merge "[errorprone] HttpConnection: Add missing summary in java"

3 weeks agoMerge "[errorprone] PackWriter: Fix javadoc tag in new #writeIndex method"
Ivan Frade [Wed, 30 Oct 2024 23:07:48 +0000 (23:07 +0000)]
Merge "[errorprone] PackWriter: Fix javadoc tag in new #writeIndex method"

3 weeks agoMerge "[errorprone] SeparateClassloadertTestRunner: use #split(String,int)"
Ivan Frade [Wed, 30 Oct 2024 23:00:52 +0000 (23:00 +0000)]
Merge "[errorprone] SeparateClassloadertTestRunner: use #split(String,int)"

3 weeks ago[errorprone] SeparateClassloadertTestRunner: use #split(String,int) 15/1197415/6
Ivan Frade [Mon, 8 Jul 2024 21:21:45 +0000 (14:21 -0700)]
[errorprone] SeparateClassloadertTestRunner: use #split(String,int)

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

3 weeks ago[errorprone] HttpConnection: Add missing summary in java 27/1203327/2
Ivan Frade [Wed, 30 Oct 2024 22:45:33 +0000 (15:45 -0700)]
[errorprone] HttpConnection: Add missing summary in java

The constants don't have summary and errorprone complains about it.

Change-Id: Id1470ed9fd54cf7fd684045c5631acc1a8d450c2

3 weeks ago[errorprone] PackWriter: Fix javadoc tag in new #writeIndex method 26/1203326/1
Ivan Frade [Wed, 30 Oct 2024 22:36:09 +0000 (15:36 -0700)]
[errorprone] PackWriter: Fix javadoc tag in new #writeIndex method

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

3 weeks ago[errorprone] ByteArraySet: Add summary fragment to javadoc 80/1197480/3
Ivan Frade [Tue, 9 Jul 2024 20:29:15 +0000 (13:29 -0700)]
[errorprone] ByteArraySet: Add summary fragment to javadoc

Reported by error prone.

Change-Id: Icaa69c37d0cde19fc605cb3f3c5f9ed9abfb37d3

3 weeks ago[errorprone] util.Stats: Add summary fragment to javadoc 79/1197479/4
Ivan Frade [Tue, 9 Jul 2024 18:10:02 +0000 (11:10 -0700)]
[errorprone] util.Stats: Add summary fragment to javadoc

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

3 weeks agoMerge "PackWriter: make PackWriter.writeIndex() take a PackIndexWriter"
Ivan Frade [Tue, 29 Oct 2024 22:14:55 +0000 (22:14 +0000)]
Merge "PackWriter: make PackWriter.writeIndex() take a PackIndexWriter"

3 weeks agoDfsInserter: Read minBytesForObjectSizeIndex only from repo config 69/1203269/5
Ivan Frade [Tue, 29 Oct 2024 17:57:28 +0000 (10:57 -0700)]
DfsInserter: Read minBytesForObjectSizeIndex only from repo config

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

3 weeks agoPackWriter: make PackWriter.writeIndex() take a PackIndexWriter 74/1202274/22
Sam Delmerico [Mon, 7 Oct 2024 21:34:03 +0000 (14:34 -0700)]
PackWriter: make PackWriter.writeIndex() take a PackIndexWriter

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

3 weeks agoMerge "dfs: update getBlockCacheStats to return a List of BlockCacheStats"
Ivan Frade [Mon, 28 Oct 2024 19:46:47 +0000 (19:46 +0000)]
Merge "dfs: update getBlockCacheStats to return a List of BlockCacheStats"

3 weeks agodfs: update getBlockCacheStats to return a List of BlockCacheStats 70/1198370/24
Laura Hamelin [Wed, 24 Jul 2024 21:01:38 +0000 (14:01 -0700)]
dfs: update getBlockCacheStats to return a List of BlockCacheStats

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

3 weeks agoMerge "Replace custom encoder Constants#encodeASCII by JDK implementation"
Matthias Sohn [Sat, 26 Oct 2024 19:06:49 +0000 (19:06 +0000)]
Merge "Replace custom encoder Constants#encodeASCII by JDK implementation"

3 weeks agoUpdate mockito to 5.14.2 42/1203042/1
Matthias Sohn [Thu, 24 Oct 2024 11:02:21 +0000 (13:02 +0200)]
Update mockito to 5.14.2

Change-Id: I0e6442a86ba1790680b832d62d4b04df0713da5f

3 weeks agoUpdate bytebuddy to 1.15.7 41/1203041/1
Matthias Sohn [Thu, 24 Oct 2024 11:00:42 +0000 (13:00 +0200)]
Update bytebuddy to 1.15.7

Change-Id: I8f718f0b06887c8ebfe70941dc2730604f0790e0

3 weeks agoMerge branch 'stable-7.1' 58/1202358/1
Matthias Sohn [Thu, 24 Oct 2024 10:49:26 +0000 (12:49 +0200)]
Merge branch 'stable-7.1'

* 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

3 weeks agoPrepare 7.1.0-SNAPSHOT builds 57/1202357/1
Matthias Sohn [Thu, 24 Oct 2024 10:48:40 +0000 (12:48 +0200)]
Prepare 7.1.0-SNAPSHOT builds

Change-Id: Ibaddbad3677636452cad4e8b7ce0a58b1a78f833

4 weeks agoJGit v7.1.0.202410232130-m2 54/1202354/1 v7.1.0.202410232130-m2
Matthias Sohn [Wed, 23 Oct 2024 21:28:50 +0000 (23:28 +0200)]
JGit v7.1.0.202410232130-m2

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

4 weeks agoMerge branch 'master' into stable-7.1 53/1202353/1
Matthias Sohn [Wed, 23 Oct 2024 20:35:13 +0000 (22:35 +0200)]
Merge branch 'master' into stable-7.1

* 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

4 weeks agoMerge branch 'stable-7.0' 52/1202352/1
Matthias Sohn [Wed, 23 Oct 2024 20:27:53 +0000 (22:27 +0200)]
Merge branch 'stable-7.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

4 weeks agoMerge changes from topic "ssh-signatures"
Matthias Sohn [Wed, 23 Oct 2024 20:17:29 +0000 (20:17 +0000)]
Merge changes from topic "ssh-signatures"

* 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

4 weeks agoMerge branch 'stable-6.10' into stable-7.0 51/1202351/1
Matthias Sohn [Wed, 23 Oct 2024 20:14:54 +0000 (22:14 +0200)]
Merge branch 'stable-6.10' into stable-7.0

* 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

4 weeks agoSSH signing: implement a SignatureVerifier 27/1202327/3
Thomas Wolf [Sat, 28 Sep 2024 14:11:45 +0000 (16:11 +0200)]
SSH signing: implement a SignatureVerifier

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>
4 weeks agoSSH signing: implement a Signer 26/1202326/3
Thomas Wolf [Sat, 28 Sep 2024 13:58:20 +0000 (15:58 +0200)]
SSH signing: implement a Signer

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>
4 weeks agoMerge "PackIndexWriter: create interface to write indexes"
Ivan Frade [Tue, 22 Oct 2024 23:06:12 +0000 (23:06 +0000)]
Merge "PackIndexWriter: create interface to write indexes"

4 weeks agoPackIndexWriter: create interface to write indexes 75/1202275/8
Sam Delmerico [Mon, 7 Oct 2024 22:20:26 +0000 (15:20 -0700)]
PackIndexWriter: create interface to write indexes

PackWriter assumes that the primary index goes to a file in a well-known
format. This cannot accomodate implementations in other storages or
formats (e.g. in a database).

Create an interface to write the index (PackIndexWriter). This interface
will be implemented by the existing pack index writer classes
(PackIndexWriterV1 etc.).

As the "PackIndexWriter" name was used by the previous superclass of the
file writers, we rename that class to "BasePackIndexWriter".

Change-Id: Ia7348395315e458fc7adc75a8db5dcb903e2a4a1

4 weeks agoMerge "DfsBlockCacheConfig: update stream.toList to collect(toList)"
Ivan Frade [Tue, 22 Oct 2024 18:24:57 +0000 (18:24 +0000)]
Merge "DfsBlockCacheConfig: update stream.toList to collect(toList)"

4 weeks agoAdd `numberOfPackFilesAfterBitmap` to RepoStatistics 34/1201534/6
Jacek Centkowski [Fri, 20 Sep 2024 06:47:13 +0000 (08:47 +0200)]
Add `numberOfPackFilesAfterBitmap` to RepoStatistics

Introduce a `numberOfPackFilesAfterBitmap` that contains the number of
packfiles created since the latest bitmap generation.

Notes:
* the `repo.getObjectDatabase().getPacks()` that obtains the list of
  packs (in the existing `getStatistics` function) uses
  `PackDirectory.scanPacks` that boils down to call to
  `PackDirectory.scanPacksImpl` which is sorting packs prior returning
  them therefore the `numberOfPackFilesAfterBitmap` is just all packs
  before the one that has bitmap attached
* the improved version of `packAndPrune` function (one that skips
  non-existent packfiles) was introduced for testing

Change-Id: I608011462f104fc002ac527aa405f492a8a4b0c2

4 weeks agoSSH signing: don't require a session in PasswordProviderWrapper 25/1202325/3
Thomas Wolf [Sun, 6 Oct 2024 15:10:38 +0000 (17:10 +0200)]
SSH signing: don't require a session in PasswordProviderWrapper

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>
4 weeks agoSSH signing: make OpenSSH pattern matching public 24/1202324/3
Thomas Wolf [Sat, 28 Sep 2024 13:52:31 +0000 (15:52 +0200)]
SSH signing: make OpenSSH pattern matching public

SSH signing needs the same pattern matching algorithm as is used for
host matching in host entries in ~/.ssh/config. So make that pattern
matching available via a static method.

Change-Id: Ia26f23666f323f44ce66f769fbcd6c85965eb219
Signed-off-by: Thomas Wolf <twolf@apache.org>
4 weeks agoSSH signing: prepare config 23/1202323/3
Thomas Wolf [Sat, 28 Sep 2024 13:50:45 +0000 (15:50 +0200)]
SSH signing: prepare config

Include the SSH specifics in the GpgConfig so that we will have access
to these configs later on.

Change-Id: Iad3d6f2bdb5ba879e1672368c82d367b8ccd246c
Signed-off-by: Thomas Wolf <twolf@apache.org>
4 weeks agossh: add a factory for KeyPasswordProvider 22/1202322/3
Thomas Wolf [Fri, 20 Sep 2024 19:59:49 +0000 (21:59 +0200)]
ssh: add a factory for KeyPasswordProvider

Introduce a global default factory to create KeyPasswordProvider.
Previously, their creation was tied to the SSH session, but for SSH
signatures, we will need to be able to create KeyPasswordProviders
without having an SSH session.

Change-Id: If4a69c4d4c4e8de390cb1ef3b65966d0e39c24ff
Signed-off-by: Thomas Wolf <twolf@apache.org>
4 weeks agoDfsBlockCacheConfig: update stream.toList to collect(toList) 52/1202852/2
Laura Hamelin [Mon, 21 Oct 2024 22:59:43 +0000 (15:59 -0700)]
DfsBlockCacheConfig: update stream.toList to collect(toList)

This change updates usage of stream's list collector to support older
jdk versions.

Change-Id: Ia066d36aef8ab166efd837d5f6f01e5d1fdd3cb7

4 weeks agoDfsBlockCache: refactor stats implementations. 51/1202651/11
Laura Hamelin [Wed, 16 Oct 2024 22:16:00 +0000 (15:16 -0700)]
DfsBlockCache: refactor stats implementations.

The stats interface has an implementation in the interface itself and another inside the PackExtBlockCache class. This asymmetry gets on the way to implement stats-per-table later.

Make DfsBlockCacheStats (the stats of a single table) a top-level class and create an aggregator class to combine multiple stats. This makes the stats classes mirror the table classes structure (singles tables + composite).

This change is part of a refactor to support providing detailed stats
breakdowns for cache implementations using multiple table instances
while keeping the existing "aggregated" view of cache stats.

Change-Id: I79c11e4ea24afe4b449efdbb47bc81eed363ffd3

5 weeks agoMerge "DfsBlockCacheConfigs: add debug configuration print"
Ivan Frade [Tue, 15 Oct 2024 23:41:06 +0000 (23:41 +0000)]
Merge "DfsBlockCacheConfigs: add debug configuration print"

5 weeks agoDfsBlockCacheConfigs: add debug configuration print 52/1198152/17
Laura Hamelin [Mon, 29 Jul 2024 23:12:15 +0000 (16:12 -0700)]
DfsBlockCacheConfigs: add debug configuration print

This will write out configuration values on a line by line basis to a
given PrintWriter.
Primary usage is as a semi-formatted debug print of the configuration
values used by dfs block cache.

Change-Id: I96724262245e4aa3423734a8b10de83322c4f89f

5 weeks agoTest advertised capabilities with protocol V0 and allow*Sha1InWant 80/1202480/6
Luca Milanesio [Fri, 11 Oct 2024 21:40:16 +0000 (22:40 +0100)]
Test advertised capabilities with protocol V0 and allow*Sha1InWant

The advertised capabilities with protocol V0 were untested
leading to potential regressions when advertising what
SHA1 should or should not be on the list of capabilities.

Verify that allow-tip-sha1-in-want and allow-reachable-sha1-in-want
are properly advertised with the allow*Sha1InWant is set in
jgit.config.

Change-Id: I99d062a5a630b02ca3d1fe83bf6cdf3c284ae941

5 weeks agoAlign request policies with CGit 76/1202276/6
Luca Milanesio [Mon, 7 Oct 2024 22:16:58 +0000 (23:16 +0100)]
Align request policies with CGit

CGit defines the SHA request policies using a bitmask
that represents which policy is implied by another policy.

For example, in CGit the ALLOW_TIP_SHA1 is 0x01 and ALLOW_REACHABLE_SHA1
is 0x02, which are associated to two different bit in a 3-bit value.
The ALLOW_ANY_SHA1 value is 0x07 which denotes a different policy that
implies the previous two ones, because is represented with a 3-bit
bitmask having all ones.

Associate the JGit RequestPolicy enum to the same CGit bitmask values
and use the same logic for the purpose of advertising the server
capabilities.

The JGit code becomes easier to read and associate with its counterpart
in CGit, especially during the capabilities advertising phase.

Also add a new utility method RequestPolicy.implies() which is more
readable than a direct bitmask and operator.

Bug: jgit-68
Change-Id: I6b2649b06623a3b8226ee8413e4f1f58ad8ea28b

5 weeks agoMerge "UploadPack: suppress resource warning for DepthWalk.RevWalk"
Matthias Sohn [Fri, 11 Oct 2024 22:53:20 +0000 (22:53 +0000)]
Merge "UploadPack: suppress resource warning for DepthWalk.RevWalk"

5 weeks agoDfsReaderOptions: read loadRevIndexInParallel from config 79/1202479/2
Ivan Frade [Fri, 11 Oct 2024 20:25:57 +0000 (13:25 -0700)]
DfsReaderOptions: read loadRevIndexInParallel from config

The options have the field but it isn't loaded from the config. This
forces a workaround downstream.

Read the option from the config, as the others.

Change-Id: I7720812e0577d8f45f6b7f5b8495a8b64729125e

5 weeks agoUploadPack: suppress resource warning for DepthWalk.RevWalk 98/1201698/2
Matthias Sohn [Tue, 8 Oct 2024 23:41:30 +0000 (01:41 +0200)]
UploadPack: suppress resource warning for DepthWalk.RevWalk

which borrows the ObjectReader from `walk` which is closed by
UploadPack#close.

Change-Id: Idb91f025c2872421702034381bb55d292d0e74ed

5 weeks agoMerge "WindowCursor: Fix parameter name in javadoc"
Matthias Sohn [Thu, 10 Oct 2024 14:12:03 +0000 (14:12 +0000)]
Merge "WindowCursor: Fix parameter name in javadoc"

6 weeks agoUpdate Apache sshd to 2.14.0 49/1202349/1
Matthias Sohn [Wed, 9 Oct 2024 00:04:55 +0000 (02:04 +0200)]
Update Apache sshd to 2.14.0

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

6 weeks agoLfsConnectionFactoryTest: remove unnecessary cast 48/1202348/1
Matthias Sohn [Mon, 16 Sep 2024 06:36:31 +0000 (08:36 +0200)]
LfsConnectionFactoryTest: remove unnecessary cast

Change-Id: I08ed51b13aa269a4f6b64ac723b6bd7649c6591c

6 weeks agoJSchSshProtocol2Test: remove unnecessary cast 47/1202347/1
Matthias Sohn [Mon, 16 Sep 2024 06:35:30 +0000 (08:35 +0200)]
JSchSshProtocol2Test: remove unnecessary cast

Change-Id: Id3767f43cbbfd0c05f9a7f0d5620943da874df92

6 weeks agoApacheSshProtocol2Test: remove unnecessary cast 46/1202346/1
Matthias Sohn [Mon, 16 Sep 2024 06:32:55 +0000 (08:32 +0200)]
ApacheSshProtocol2Test: remove unnecessary cast

Change-Id: Ie8e7b097e48342a9cda6873e8595146a1b3f1427

6 weeks agoNoteMapMerger: remove unnecessary cast 45/1202345/1
Matthias Sohn [Mon, 16 Sep 2024 06:30:39 +0000 (08:30 +0200)]
NoteMapMerger: remove unnecessary cast

Change-Id: I3be4963f506529bbadc5b6dfc0b625ee85effc1f

6 weeks agoUpdate jetty to 12.0.14 43/1202343/1
Matthias Sohn [Wed, 9 Oct 2024 21:39:28 +0000 (23:39 +0200)]
Update jetty to 12.0.14

Change-Id: I05da7de8fa370e3f00532f9f50408ddb79d37e56

6 weeks agoUpdate Apache sshd to 2.14.0 40/1202340/1
Matthias Sohn [Wed, 9 Oct 2024 00:04:55 +0000 (02:04 +0200)]
Update Apache sshd to 2.14.0

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

6 weeks agoorbit-4.34: update junit bundle to 4.13.2.v20240929-1000 39/1202339/1
Matthias Sohn [Wed, 9 Oct 2024 00:04:25 +0000 (02:04 +0200)]
orbit-4.34: update junit bundle to 4.13.2.v20240929-1000

Change-Id: I641c4dc44af47106149804fa05313d62d4f33325

6 weeks agoWindowCursor: Fix parameter name in javadoc 30/1202330/1
Nasser Grainawi [Tue, 8 Oct 2024 21:46:22 +0000 (14:46 -0700)]
WindowCursor: Fix parameter name in javadoc

This doc was copied from another where the parameter had a shorter name.

Change-Id: I6ae1afa525f02e26ab7224cced56db946f679bb8
Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
6 weeks agoRevolveMerger: honor ignoreConflicts also for binary files 97/1201697/5
Kamil Musin [Tue, 8 Oct 2024 11:36:00 +0000 (13:36 +0200)]
RevolveMerger: honor ignoreConflicts also for binary files

Currently difference in binary files during merge will cause them to be
added to unmergedPaths regardless of whether ignoreConflicts is true.

This creates an issue during merging with strategy "RECURSIVE", as it
makes it impossible to create a virtual commit if there is a difference
in a binary file. Resulting in the
CONFLICTS_DURING_MERGE_BASE_CALCULATION error being thrown.

This is especially problematic, since JGit has a
rather simplistic rules for considering file binary, which easily leads
to false positives.

What we should do instead is keep OURS. This will not lead to silently
ignoring difference in the final result. It will allow creation of
virtual merge-base commit, and then the difference would be presented
again in the final merge results. In essense it only affects what's
shown as BASE in 3-way merge.

Additionally, this is correct because
- It's consistent with treatment of other unmergeable entities, for
  example Gitlinks
- It's consistent with behaviour of CGit:
  - https://git-scm.com/docs/gitattributes#Documentation/gitattributes.txt-binary
    states on diffs in binary OURS is picked by default.
  - In code: https://git.kernel.org/pub/scm/git/git.git/tree/merge-ll.c#n81
- ignoreConflicts in CGit afterwards ignores all issues with content
  merging https://git.kernel.org/pub/scm/git/git.git/tree/merge-ort.c#n5201

We also adjust the behaviour when .gitattributes tell us to treat the
file as binary for the purpose of the merge.

We only change the behaviour when ignoreConlicts = true, as otherwise
the current behaviour works as intended.

Change-Id: I2b69f80a13d250aad3fe12dd438b2763f3022270

6 weeks agodfs: add configurable name to block cache table stats 68/1198368/13
Laura Hamelin [Wed, 24 Jul 2024 20:56:28 +0000 (13:56 -0700)]
dfs: add configurable name to block cache table stats

The addition of a name will help show statistics broken down per inner
cache table when more than one cache table is used.

The name configuration is obtained from the config subsection name
prefixed by `dfs`, or `dfs` for the base case.

Change-Id: Ia16c794f094d756441b779e3b1f1a3c992443509

6 weeks agoMerge "DfsBlockCache: use PackExtBlockCacheTable when configured"
Ivan Frade [Mon, 7 Oct 2024 16:09:32 +0000 (16:09 +0000)]
Merge "DfsBlockCache: use PackExtBlockCacheTable when configured"

6 weeks agoDfsBlockCache: use PackExtBlockCacheTable when configured 66/1196166/20
Laura Hamelin [Mon, 10 Jun 2024 20:42:03 +0000 (13:42 -0700)]
DfsBlockCache: use PackExtBlockCacheTable when configured

Adds the usage of PackExtBlockCacheTable to the
DfsBlockCache, replacing the current DfsBlockCacheTable
when PackExtCacheConfigurations exists.
When no PackExtCacheConfigurations exists the current
DfsBlockCacheTable implementation will be used.

Change-Id: I42222a0cb43785baba907a49077dd9874d19d891

7 weeks agoPrepare 7.1.0-SNAPSHOT builds 95/1201695/1
Matthias Sohn [Tue, 1 Oct 2024 23:36:12 +0000 (01:36 +0200)]
Prepare 7.1.0-SNAPSHOT builds

Change-Id: I6329845c41bf40a752c685fb77483d9722cd1583

7 weeks agoJGit v7.1.0.202410012040-m1 92/1201692/1 v7.1.0.202410012040-m1
Matthias Sohn [Tue, 1 Oct 2024 20:40:00 +0000 (22:40 +0200)]
JGit v7.1.0.202410012040-m1

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

7 weeks agoLfsConnectionFactoryTest: remove unnecessary cast 57/1200657/5
Matthias Sohn [Mon, 16 Sep 2024 06:36:31 +0000 (08:36 +0200)]
LfsConnectionFactoryTest: remove unnecessary cast

Change-Id: I08ed51b13aa269a4f6b64ac723b6bd7649c6591c

7 weeks agoJSchSshProtocol2Test: remove unnecessary cast 56/1200656/4
Matthias Sohn [Mon, 16 Sep 2024 06:35:30 +0000 (08:35 +0200)]
JSchSshProtocol2Test: remove unnecessary cast

Change-Id: Id3767f43cbbfd0c05f9a7f0d5620943da874df92

7 weeks agoApacheSshProtocol2Test: remove unnecessary cast 55/1200655/3
Matthias Sohn [Mon, 16 Sep 2024 06:32:55 +0000 (08:32 +0200)]
ApacheSshProtocol2Test: remove unnecessary cast

Change-Id: Ie8e7b097e48342a9cda6873e8595146a1b3f1427

7 weeks agoNoteMapMerger: remove unnecessary cast 54/1200654/2
Matthias Sohn [Mon, 16 Sep 2024 06:30:39 +0000 (08:30 +0200)]
NoteMapMerger: remove unnecessary cast

Change-Id: I3be4963f506529bbadc5b6dfc0b625ee85effc1f

7 weeks agoUpdate mockito to 5.14.1 90/1201690/1
Matthias Sohn [Tue, 1 Oct 2024 14:29:18 +0000 (16:29 +0200)]
Update mockito to 5.14.1

Change-Id: I6da7acb4fb8188a5bd32382eca12593febff29b7

7 weeks agoUpdate jna to 5.15.0 89/1201689/1
Matthias Sohn [Tue, 1 Oct 2024 14:20:54 +0000 (16:20 +0200)]
Update jna to 5.15.0

Change-Id: I164964b2173ee285d35d6d3a29caf30c0b8a6f95

7 weeks agoUpdate bytebuddy to 1.15.3 88/1201688/1
Matthias Sohn [Tue, 1 Oct 2024 14:18:04 +0000 (16:18 +0200)]
Update bytebuddy to 1.15.3

Change-Id: Ib17b92d6f413f706ff97fb4ccf07847f4b5808ad

7 weeks agoUpdate commons-io:commons-io to 2.17.0 87/1201687/1
Matthias Sohn [Tue, 1 Oct 2024 14:07:40 +0000 (16:07 +0200)]
Update commons-io:commons-io to 2.17.0

Change-Id: Ib3030b917ffb1a02115345e9050180313efdc19b

7 weeks agoMerge "Record failing paths in recursive merge."
Ivan Frade [Fri, 27 Sep 2024 18:07:35 +0000 (18:07 +0000)]
Merge "Record failing paths in recursive merge."

7 weeks agoMerge "FileRepository: Remove unnecessary setConfig call"
Ivan Frade [Fri, 27 Sep 2024 15:56:13 +0000 (15:56 +0000)]
Merge "FileRepository: Remove unnecessary setConfig call"

7 weeks agoMerge "DfsInserter: Create PackConfig from repo instead of repo.conf"
Ivan Frade [Fri, 27 Sep 2024 15:55:04 +0000 (15:55 +0000)]
Merge "DfsInserter: Create PackConfig from repo instead of repo.conf"

7 weeks agoFileRepository: Remove unnecessary setConfig call 38/1201738/2 71/1000671/edit-1201738/1
Ivan Frade [Tue, 24 Sep 2024 23:32:31 +0000 (16:32 -0700)]
FileRepository: Remove unnecessary setConfig call

The constructor of GC sets exactly the same config. Remove this
set to make clearer from where the config is coming.

Change-Id: Idb71c7827f180923092ef5392545df81960ee93a

7 weeks agoMerge branch 'stable-7.0' 86/1201686/1
Matthias Sohn [Thu, 26 Sep 2024 21:39:11 +0000 (23:39 +0200)]
Merge branch 'stable-7.0'

* stable-7.0:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: If885f81c5273693c0c9c6efcfe4b646ab936cefe

7 weeks agoMerge branch 'stable-6.10' into stable-7.0 85/1201685/1
Matthias Sohn [Thu, 26 Sep 2024 21:38:31 +0000 (23:38 +0200)]
Merge branch 'stable-6.10' into stable-7.0

* stable-6.10:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: I22ec79d91136f8209a3799465db5593d83f7bea9

7 weeks agoMerge branch 'stable-6.9' into stable-6.10 84/1201684/1
Matthias Sohn [Thu, 26 Sep 2024 21:37:39 +0000 (23:37 +0200)]
Merge branch 'stable-6.9' into stable-6.10

* stable-6.9:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: I662c7a76470cedf0d4c975c50c3981c1c86245f2

7 weeks agoMerge branch 'stable-6.8' into stable-6.9 83/1201683/1 stable-6.9
Matthias Sohn [Thu, 26 Sep 2024 21:37:14 +0000 (23:37 +0200)]
Merge branch 'stable-6.8' into stable-6.9

* stable-6.8:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: Ia5a0a4f0e900d96fa638bb9f97988ac66f4b7068

7 weeks agoMerge branch 'stable-6.7' into stable-6.8 82/1201682/1 stable-6.8
Matthias Sohn [Thu, 26 Sep 2024 21:36:45 +0000 (23:36 +0200)]
Merge branch 'stable-6.7' into stable-6.8

* stable-6.7:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: I1e485422608cf55373c1d86c4c0d50c9f9f49f20

7 weeks agoMerge branch 'stable-6.6' into stable-6.7 81/1201681/1 stable-6.7
Matthias Sohn [Thu, 26 Sep 2024 21:36:12 +0000 (23:36 +0200)]
Merge branch 'stable-6.6' into stable-6.7

* stable-6.6:
  AdvertisedRequestValidator: fix WantNotValidException caused by race

Change-Id: I5b7b097a4b57ec48a3ee20fc25cb0d080cc1af80

8 weeks agoAdvertisedRequestValidator: fix WantNotValidException caused by race 80/1201680/3 stable-6.6
Matthias Sohn [Tue, 24 Sep 2024 08:51:22 +0000 (10:51 +0200)]
AdvertisedRequestValidator: fix WantNotValidException caused by race

Fetch with protocol V2 failed under the following conditions
- fetch uses bidirectional protocol (git, ssh) which uses a shortcut
  to determine invalid wants
- not all wants are advertised
- race condition: wanted ref is updated during fetch by another thread
  after the thread serving upload-pack determined wants and before it
  checks not advertised wants

Fix this by calling
`new ReachableCommitRequestValidator().checkWants(up, wants)`
instead of throwing WantNotValidException in [1]
if this race happened in the same way like it's done for unidirectional
protocols (http) [2].

[1] https://github.com/eclipse-jgit/jgit/blob/stable-6.10/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java#L2002
[2] https://github.com/eclipse-jgit/jgit/blob/stable-6.10/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java#L2000

Bug: jgit-48
Change-Id: I32f28502923815dc49781aab5d810c9afbe7e7e6

8 weeks agoDfsInserter: Create PackConfig from repo instead of repo.conf 35/1201735/1
Ivan Frade [Tue, 24 Sep 2024 22:23:04 +0000 (15:23 -0700)]
DfsInserter: Create PackConfig from repo instead of repo.conf

PackConfig can be constructed from the repo or from a config. While
browing the code, it is easier to follow the provenance of the
configuration when using the repository constructor.

Use the PackConfig(Repository) constructor in the
DfsInserter. Internally it calls PackConfig(repo.getConfig()) so this
should be a noop.

Change-Id: Ifce5bc87404ca8ec9a821d28253d489056faad9a

8 weeks agoRecord failing paths in recursive merge. 54/1201654/3
jackdt@google.com [Mon, 23 Sep 2024 20:19:48 +0000 (13:19 -0700)]
Record failing paths in recursive merge.

This is meant to help diagnose LOCK_FAILURE errors, which otherwise provides
very little information in
https://eclipse.googlesource.com/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java#731.

Change-Id: I3d544c899fe66effbd107ea2f38d73f6f253a7e6

2 months agoMerge "DfsReader: Fallback to regular size read if size index throws"
Ivan Frade [Fri, 20 Sep 2024 17:54:54 +0000 (17:54 +0000)]
Merge "DfsReader: Fallback to regular size read if size index throws"

2 months agoPackIndex: Add protected setters to populate the MutableEntry 30/1201530/6
jackdt@google.com [Thu, 19 Sep 2024 20:28:27 +0000 (13:28 -0700)]
PackIndex: Add protected setters to populate the MutableEntry

Implementations of the iterator out of package receive a MutableEntry but they don't have a way to set data into it.

Add setters to the MutableEntry via protected methods in the iterator. This way, only implementors of the Iterator can modify the entry (cannot be modified e.g. by callers).

Change-Id: Id50c69d8be230ebdb8108acc47df13abcad0af0a

2 months agoDfsReader: Fallback to regular size read if size index throws 00/1201400/6
Ivan Frade [Tue, 17 Sep 2024 20:50:59 +0000 (13:50 -0700)]
DfsReader: Fallback to regular size read if size index throws

The reader can get IOException when reading the object size index, but
that index is an optimization, the size should still be available in
the pack.

Use the regular #getObjectSize() as a fallback when we get an
IOException from the object size index.

Change-Id: Ic5ec2cfc7c698aa94c6cfd5960cbab6c129f595a

2 months agoPackWriter: Remove constructor with only Reader as param 56/1201356/1
Ivan Frade [Mon, 16 Sep 2024 19:44:00 +0000 (12:44 -0700)]
PackWriter: Remove constructor with only Reader as param

At construction time, PackWriter receives the PackConfig as a
parameter or reads it from the repository. The only exception is when
the constructor receives only a reader (no repo nor conf
provided?!).

Remove PackWriter(Reader) and let callers be explicit what conf to
use. This makes clearer the flow of conf in the PackWriter.

Change-Id: If12e122797ffc8c44fc3c435ca1b000ca016645b

2 months agoPackIndex: Simplify Iterator/MutableEntry interaction 03/1200703/29
jackdt@google.com [Wed, 4 Sep 2024 23:07:23 +0000 (16:07 -0700)]
PackIndex: Simplify Iterator/MutableEntry interaction

The iterator keeps the current position in the index and the MutableEntry reads data from there on-demand, but the iterator needs to know about the entry and this creates a complicated interaction.

Make MutableEntry a simple data object and let the iterator iterate and populate it before returning it. Code is clearer and implementors only needs to worry about the iterator.

This fixes also MutableEntry visibility, that was preventing subclassing from out of the package.

Change-Id: I35010d1f80237e421dd51b8d3d61a8ecb03e0d01