]> source.dussan.org Git - jgit.git/log
jgit.git
7 days agoPrepare 7.1.0-SNAPSHOT builds 81/1204281/1
Matthias Sohn [Tue, 19 Nov 2024 14:46:50 +0000 (15:46 +0100)]
Prepare 7.1.0-SNAPSHOT builds

Change-Id: I69f57f933899b9926ab5124b24b90ae75f7a8d09

7 days agoJGit v7.1.0.202411191359-rc1 18/1203918/1 v7.1.0.202411191359-rc1
Matthias Sohn [Tue, 19 Nov 2024 13:59:25 +0000 (14:59 +0100)]
JGit v7.1.0.202411191359-rc1

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

7 days agoMerge branch 'master' into stable-7.1 17/1203917/1
Matthias Sohn [Tue, 19 Nov 2024 13:58:31 +0000 (14:58 +0100)]
Merge branch 'master' into stable-7.1

* master:
  RecursiveMerger: fix boxing warning
  UploadPackTest: fix unclosed resource warning
  Suppress non-externalized string warnings
  Remove unused API problem filters
  PersonIdent: Use java.time instead of older Date and milliseconds
  GitTimeParser: A date parser using the java.time API
  Configure JDT to not raise error on deprecated class linked in javadoc
  Update Jetty to 12.0.15
  PullCommandTest: assert git status in some simple tests
  SystemReader: add method to get LocalDateTime
  SystemReader#now: make it a concrete method
  [errorprone] RawText: Add parenthesis for explicit op precedence
  MockSystemReader: create the right time zone
  RawText: improve performance of isCrLfText and isBinary
  SystemReader: Give a default implementation to #getTimezoneAt()
  [errorprone] ssh: suppress warning for arrays in records
  Don't fail when trying to prune pack which is already gone

Change-Id: I9161ba5dfa7ce4d0ba8ef44833124ecd414cb39d

7 days agoMerge "PullCommandTest: assert git status in some simple tests"
Matthias Sohn [Tue, 19 Nov 2024 13:57:51 +0000 (13:57 +0000)]
Merge "PullCommandTest: assert git status in some simple tests"

7 days agoRecursiveMerger: fix boxing warning 16/1203916/1
Matthias Sohn [Tue, 19 Nov 2024 12:19:03 +0000 (13:19 +0100)]
RecursiveMerger: fix boxing warning

Change-Id: I6f6ae540b128ff6b965931e829da1368a8b88ddb

7 days agoUploadPackTest: fix unclosed resource warning 15/1203915/1
Matthias Sohn [Tue, 19 Nov 2024 12:17:08 +0000 (13:17 +0100)]
UploadPackTest: fix unclosed resource warning

Change-Id: I4efccd72bd567d42e739ee330e26c6b04d5c5c01

7 days agoSuppress non-externalized string warnings 14/1203914/1
Matthias Sohn [Tue, 19 Nov 2024 12:12:53 +0000 (13:12 +0100)]
Suppress non-externalized string warnings

Change-Id: Ib0737f7ec6b9872f6d4514d140e7d32a4a40809d

7 days agoRemove unused API problem filters 13/1203913/1
Matthias Sohn [Tue, 19 Nov 2024 12:05:25 +0000 (13:05 +0100)]
Remove unused API problem filters

Change-Id: I8f5d2f6f1c6244f1b49fee713f7a06c0e9ec549b

7 days agoPersonIdent: Use java.time instead of older Date and milliseconds 42/1204142/9
Ivan Frade [Fri, 15 Nov 2024 18:26:21 +0000 (10:26 -0800)]
PersonIdent: Use java.time instead of older Date and milliseconds

From errorprone: Date has a bad API that leads to bugs; prefer
java.time.Instant or LocalDate.

Replace the long with milliseconds and int with minutes offset with an
Instant and a ZoneOffset. Create new constructors and deprecate
variants with Date, milliseconds and minute offsets.

When comparing instances of PersonIdent truncate the timestamp precision
to 1 second since git commit timestamps are persisted with 1 second
precision [1].

[1] https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-Gitinternalformat

Change-Id: Id4ba1f108e1ba0bfcdd87ba37c67e2d3cc7d254f

7 days agoGitTimeParser: A date parser using the java.time API 41/1204141/7
Ivan Frade [Mon, 11 Nov 2024 21:13:59 +0000 (13:13 -0800)]
GitTimeParser: A date parser using the java.time API

Replacement of GitDateParser that uses java.time classes instead of
the obsolete Date. Updating GitDateParser would have been a mess of
deprecation and methods with confusing names, so I opted for writing a
parallel class with the new types.

Some differences:

* The new DateTimeFormatter is thread-safe, so we don't need the
LocalThread cache

* No code seems to use other locale than the default, we don't need to
cache per locale either

Change-Id: If24610a055a47702fb5b7be2fc35a7c722480ee3

7 days agoConfigure JDT to not raise error on deprecated class linked in javadoc 12/1203912/2
Matthias Sohn [Tue, 19 Nov 2024 10:11:40 +0000 (11:11 +0100)]
Configure JDT to not raise error on deprecated class linked in javadoc

Change-Id: I4f8cdaa3147c03b455ed0656622c6b69b474577a

7 days agoMerge "Update Jetty to 12.0.15"
Matthias Sohn [Tue, 19 Nov 2024 09:28:20 +0000 (09:28 +0000)]
Merge "Update Jetty to 12.0.15"

8 days agoUpdate Jetty to 12.0.15 10/1203910/1
Matthias Sohn [Mon, 18 Nov 2024 21:26:13 +0000 (22:26 +0100)]
Update Jetty to 12.0.15

Change-Id: I8414114bb6c38b62d912e55810b4bf68faf3083f

12 days agoPullCommandTest: assert git status in some simple tests 09/1203909/2
Matthias Sohn [Thu, 14 Nov 2024 22:28:17 +0000 (23:28 +0100)]
PullCommandTest: assert git status in some simple tests

Bug: jgit-107
Change-Id: I54856849df7c6959ccc2b6f10de510950d3da401

12 days agoSystemReader: add method to get LocalDateTime 40/1204140/1
Ivan Frade [Tue, 12 Nov 2024 20:29:13 +0000 (12:29 -0800)]
SystemReader: add method to get LocalDateTime

Using #civilNow() because in the documentation, this calendar-based
representation is called "civil time".

Change-Id: Iaa363e66683cb548419666068a4ffef44a776e12

12 days agoSystemReader#now: make it a concrete method 49/1204049/2
Ivan Frade [Thu, 14 Nov 2024 00:25:42 +0000 (16:25 -0800)]
SystemReader#now: make it a concrete method

Abstract methods break subclasses (e.g. DelegateSystemReader in
gerrit). Updating jgit and gerrit is simpler if we do not add them. I
am not sure why some methods are abstract and others dont, but now()
can be a concrete method.

Make now() concrete. Implement it by default based on
getCurrentTime(), so subclasses overriding that method get the same
value.

Change-Id: I697749f8cba698c5388ed13ebdc2b238d6259358

12 days agoMerge "MockSystemReader: create the right time zone"
Ivan Frade [Thu, 14 Nov 2024 16:51:58 +0000 (16:51 +0000)]
Merge "MockSystemReader: create the right time zone"

13 days ago[errorprone] RawText: Add parenthesis for explicit op precedence 48/1204048/1
Ivan Frade [Thu, 14 Nov 2024 00:11:17 +0000 (16:11 -0800)]
[errorprone] RawText: Add parenthesis for explicit op precedence

errorprone reports:

[OperatorPrecedence] Use grouping parenthesis to make the
operator precedence explicit

Take the chance to fix also
https://errorprone.info/bugpattern/YodaCondition in the same lines.

Change-Id: I6d8f00842ef2bb24cd00fc413121b8a4e20c186b

13 days agoMockSystemReader: create the right time zone 47/1204047/2
Ivan Frade [Tue, 12 Nov 2024 20:26:02 +0000 (12:26 -0800)]
MockSystemReader: create the right time zone

Using this timezone in a later commit, it complains:

Exception java.time.DateTimeException: Zone offset minutes and seconds
must be negative because hours is negative

Change-Id: I5787b51f98109942ac33e0496c5e3761914b2a78

13 days agoMerge "SystemReader: Give a default implementation to #getTimezoneAt()"
Ivan Frade [Wed, 13 Nov 2024 22:19:48 +0000 (22:19 +0000)]
Merge "SystemReader: Give a default implementation to #getTimezoneAt()"

13 days agoRawText: improve performance of isCrLfText and isBinary 58/1200658/5
XenoAmess [Mon, 23 Sep 2024 20:18:06 +0000 (04:18 +0800)]
RawText: improve performance of isCrLfText and isBinary

Inline the function isBinary(byte, byte), and reduce several duplicated
checks in it, for better performance.

Change-Id: Ida855ed4fd7456d8fb7ed68f3af2dbfa0e25897c

13 days agoSystemReader: Give a default implementation to #getTimezoneAt() 41/1204041/2
Ivan Frade [Wed, 13 Nov 2024 19:58:06 +0000 (11:58 -0800)]
SystemReader: Give a default implementation to #getTimezoneAt()

This abstract method forces subclasses (e.g. DelegateSystemReader in
gerrit) to update their code, but there is no strong reason to make it
abstract (subclasses can override it if needed).

Make the method concrete using the current default implementation
(which is the same in the mock).

Change-Id: Id1df0d71cab1d86879adf48e782f0050d3abcfa9

13 days agoMerge "[errorprone] ssh: suppress warning for arrays in records"
Ivan Frade [Wed, 13 Nov 2024 17:12:08 +0000 (17:12 +0000)]
Merge "[errorprone] ssh: suppress warning for arrays in records"

13 days ago[errorprone] ssh: suppress warning for arrays in records 80/1203980/2
Ivan Frade [Tue, 12 Nov 2024 23:40:43 +0000 (15:40 -0800)]
[errorprone] ssh: suppress warning for arrays in records

Errorpone considers an error to have arrays (mutable) inside records
(immutable) [1].

Suppress the warnings in these records, as they are overriding equals
and hash to do the right thing.

[1] https://errorprone.info/bugpattern/ArrayRecordComponent

Change-Id: I01c724516b1b14d512d366a35708436463fccffc

13 days agoMerge branch 'stable-7.1' 04/1203904/1
Matthias Sohn [Wed, 13 Nov 2024 12:23:15 +0000 (13:23 +0100)]
Merge branch 'stable-7.1'

* stable-7.1:
  Prepare 7.1.0-SNAPSHOT builds
  JGit v7.1.0.202411121450-m3

Change-Id: Ib507d052f37695f9e8235ef1711f4e8eaa113cd0

13 days agoPrepare 7.1.0-SNAPSHOT builds 03/1203903/1
Matthias Sohn [Wed, 13 Nov 2024 12:22:35 +0000 (13:22 +0100)]
Prepare 7.1.0-SNAPSHOT builds

Change-Id: Id5379361dd8673e91c998b56f2ee61e041da6113

2 weeks agoJGit v7.1.0.202411121450-m3 00/1203900/1 v7.1.0.202411121450-m3
Matthias Sohn [Tue, 12 Nov 2024 14:49:41 +0000 (15:49 +0100)]
JGit v7.1.0.202411121450-m3

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

2 weeks agoDon't fail when trying to prune pack which is already gone 56/1203856/2
Jacek Centkowski [Mon, 11 Nov 2024 11:48:20 +0000 (12:48 +0100)]
Don't fail when trying to prune pack which is already gone

Update the TestRepository.prunePacked so that it doesn't fail if a pack
to be pruned is already gone. It is especially handy when prunePacked
function is called in `TestRepository.packAndPrune` function after repo
moves on after the GC was performed.

Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c

2 weeks agoMerge branch 'master' into stable-7.1 57/1203557/1
Matthias Sohn [Mon, 11 Nov 2024 23:06:18 +0000 (00:06 +0100)]
Merge branch 'master' into stable-7.1

* master:
  errorprone: Disable javadoc checks in tests
  Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap
  Replace custom encoder Constants#encodeASCII by JDK implementation
  Replace custom encoder `Constants#encode` by JDK implementation
  DfsGarbageCollector: #setReflogExpire with Instant instead of Date
  ssh: Minor simplification in SerialRangeSet
  DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs
  SystemReader: Offer methods with java.time API
  Add `numberOfPackFilesAfterBitmap` to RepoStatistics
  Enhance CommitBuilder#parent to tolerate null parent
  GPG: use BC PGP secret key parsing out of the box
  [errorprone] bc: Remove unused SExprParser#parseSecretKey
  Update bouncycastle to 1.79
  Update bytebuddy to 1.15.10
  DfsPackCompactor: write object size index
  [errorprone] BaseRepositoryBuilder: Use #split(sep, limit)
  [errorprone] Remove deprecated security manager
  [errorprone] RefDatabase: #getConflictingNames immutable return
  DfsGarbageCollector: Add setter for reflog expiration time.
  [errorprone] SeparateClassloadertTestRunner: use #split(String,int)
  [errorprone] HttpConnection: Add missing summary in java
  [errorprone] PackWriter: Fix javadoc tag in new #writeIndex method
  [errorprone] ByteArraySet: Add summary fragment to javadoc
  [errorprone] util.Stats: Add summary fragment to javadoc
  DfsInserter: Read minBytesForObjectSizeIndex only from repo config
  PackWriter: make PackWriter.writeIndex() take a PackIndexWriter
  dfs: update getBlockCacheStats to return a List of BlockCacheStats
  Update mockito to 5.14.2
  Update bytebuddy to 1.15.7
  Remove unnecessary argument handler in MergeBase.java
  Replace custom encoder Constants#encodeASCII by JDK implementation

Change-Id: I0f84a69af152936f66bbcd2c8d9190ad159e7878

2 weeks agoMerge branch 'stable-7.0' 56/1203556/1
Matthias Sohn [Mon, 11 Nov 2024 22:55:18 +0000 (23:55 +0100)]
Merge branch 'stable-7.0'

* stable-7.0:
  Replace custom encoder Constants#encodeASCII by JDK implementation
  Replace custom encoder `Constants#encode` by JDK implementation
  Add `numberOfPackFilesAfterBitmap` to RepoStatistics
  Enhance CommitBuilder#parent to tolerate null parent

Change-Id: I46f961144f2e3c4c57ef0f63a9c8954fee8133e9

2 weeks agoMerge branch 'stable-6.10' into stable-7.0 55/1203555/1
Matthias Sohn [Mon, 11 Nov 2024 22:39:12 +0000 (23:39 +0100)]
Merge branch 'stable-6.10' into stable-7.0

* stable-6.10:
  Replace custom encoder Constants#encodeASCII by JDK implementation
  Replace custom encoder `Constants#encode` by JDK implementation
  Add `numberOfPackFilesAfterBitmap` to RepoStatistics
  Enhance CommitBuilder#parent to tolerate null parent

Change-Id: If05b0d474c728b54cab9af2b7416be30b2754d1b

2 weeks agoMerge "DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs"
Ivan Frade [Mon, 11 Nov 2024 21:18:30 +0000 (21:18 +0000)]
Merge "DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs"

2 weeks agoMerge "ssh: Minor simplification in SerialRangeSet"
Matthias Sohn [Mon, 11 Nov 2024 21:10:19 +0000 (21:10 +0000)]
Merge "ssh: Minor simplification in SerialRangeSet"

2 weeks agoMerge "Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap"
Matthias Sohn [Mon, 11 Nov 2024 21:08:24 +0000 (21:08 +0000)]
Merge "Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap"

2 weeks agoerrorprone: Disable javadoc checks in tests 86/1203886/2
Ivan Frade [Mon, 11 Nov 2024 19:07:21 +0000 (11:07 -0800)]
errorprone: Disable javadoc checks in tests

Errorprone finds many problems in the tests javadocs. This is noisy in
the logs, but fixing them also disturbs the project history and can
complicate merges.

Disable the javadoc checks in the tests packages. We can fix those
javadocs if some other modification happen in the file (as we fix
older coding style).

Change-Id: Ic221b60afe77ed9c207adbefd9117d2e26107792

2 weeks agoRename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap 54/1203854/1
Jacek Centkowski [Mon, 11 Nov 2024 11:36:03 +0000 (12:36 +0100)]
Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap

As sugested in I608011462f1.

Change-Id: If66226dd7b08ae768413fa614df5dcb6b44dc118

2 weeks agoReplace custom encoder Constants#encodeASCII by JDK implementation 48/1203548/3
Matthias Sohn [Fri, 6 Sep 2024 11:42:27 +0000 (13:42 +0200)]
Replace custom encoder Constants#encodeASCII by JDK implementation

Ensure that the method still throws an IllegalArgumentException for
malformed input or if the String contains unmappable characters.

Change-Id: I6a340aa1af60c315272ff13b6bf2041ba30c94ca
(cherry picked from commit 0fd76114e3436ac635641d06371fd8833179312d)

2 weeks agoReplace custom encoder `Constants#encode` by JDK implementation 47/1203547/3
Matthias Sohn [Fri, 6 Sep 2024 10:26:44 +0000 (12:26 +0200)]
Replace custom encoder `Constants#encode` by JDK implementation

Using the implementation provided in the JDK since Java 1.6 by
`String#getBytes(Charset)` reduces JGit maintenance effort and improves
performance.

The method Constants#encode was implemented when JGit still used Java
1.5. See [1].

Kudos to Marcin for proposing to use this improvement in RefWriter [2].
I think it should be used generally.

[1] https://repo.or.cz/jgit.git?a=commit;h=bfa3da225f198b19061158499b1135aff07d85b3
[2] https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/1195180

Also-By: Marcin Czech <maczech@gmail.com>
Change-Id: I361ed6286b98351a315b8a8ffc3cb845831d35b2
(cherry picked from commit e5d2898997462e0f2409c09497ab62c6cda2dbaf)

2 weeks agoDfsGarbageCollector: #setReflogExpire with Instant instead of Date 99/1203799/3
Ivan Frade [Fri, 8 Nov 2024 16:49:09 +0000 (08:49 -0800)]
DfsGarbageCollector: #setReflogExpire with Instant instead of Date

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). [1]

Replace the Date with Instant in the
DfsGarbageCollector#setReflogExpire method.

[1] https://errorprone.info/bugpattern/JavaUtilDate

Change-Id: Ie98e426e63621e8bef96c31bca56aec0c8eef5a6

2 weeks agossh: Minor simplification in SerialRangeSet 00/1203800/1
Thomas Wolf [Fri, 8 Nov 2024 17:18:21 +0000 (18:18 +0100)]
ssh: Minor simplification in SerialRangeSet

Instead of set.headMap(x).lastKey() use set.floorKey(x) and
instead of set.tailMap(x).firstKey() use set.ceilingKey(x).

Change-Id: I22f44cbe82b9ead06d6ff517d609dfdbc89a758c

2 weeks agoDfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs 73/1203673/3
Laura Hamelin [Wed, 6 Nov 2024 21:41:30 +0000 (13:41 -0800)]
DfsBlockCacheConfig: propagate hotmap configs to pack ext cache configs

CacheHotMap is currently only set on the base DfsBlockCacheConfig and is
not propagated down to PackExt specific caches.

Because CacheHotMap is set from a method call rather than from Configs,
this change sets per-PackExt CacheHotMap configs on PackExt cache
configs both when DfsBlockCacheConfig#setCacheHotMap(...) is called, and
when DfsBlockCacheConfig#configure(...) is called after setCacheHotMap.

The outer DfsBlockCacheConfig keeps the full CacheHotMap for the same
reason that the CacheHotMap config is propagated in both setCacheHotMap
and configure: the order of operations setting the configuration from
Configs and calling setCacheHotMap is not guaranteed.

Change-Id: Id9dc32fedca99ecc83c9dc90c24d9616873a202e

2 weeks agoMerge "SystemReader: Offer methods with java.time API"
Ivan Frade [Fri, 8 Nov 2024 00:34:37 +0000 (00:34 +0000)]
Merge "SystemReader: Offer methods with java.time API"

2 weeks agoMerge "Remove unnecessary argument handler in MergeBase.java"
Matthias Sohn [Fri, 8 Nov 2024 00:10:04 +0000 (00:10 +0000)]
Merge "Remove unnecessary argument handler in MergeBase.java"

2 weeks agoSystemReader: Offer methods with java.time API 75/1203675/2
Ivan Frade [Mon, 4 Nov 2024 22:21:24 +0000 (14:21 -0800)]
SystemReader: Offer methods with java.time API

Error prone explains: 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).

Add to SystemReader methods to get the time and timezone in the new
java.time classes (Instant/ZoneId) and mark as deprecated their old
counterparts.

The mapping of methods is:
* #getCurrentTime -> #now (returns Instant instead of int)
* #getTimezone -> #getTimeZoneAt (returns ZoneOffset intead of int)
* #getTimeZone -> #getTimeZoneId (return ZoneId instead of TimeZone)

Change-Id: Ic55b2f442a40046ff0ed24f61f566fc7416471be

2 weeks agoAdd `numberOfPackFilesAfterBitmap` to RepoStatistics 35/1203735/3
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
  `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

2 weeks agoEnhance CommitBuilder#parent to tolerate null parent 46/1203546/1
Matthias Sohn [Thu, 7 Nov 2024 22:35:13 +0000 (23:35 +0100)]
Enhance CommitBuilder#parent to tolerate null parent

Change-Id: Ifdeafd040bca8331804c3e7568da0bee5cbd01df

2 weeks agoGPG: use BC PGP secret key parsing out of the box 69/1203669/2
Thomas Wolf [Wed, 6 Nov 2024 18:14:47 +0000 (19:14 +0100)]
GPG: use BC PGP secret key parsing out of the box

Remove the custom S-expression parsing; BC has gotten many
improvements in 1.79 regarding PGP ed25519 keys, AES/OCB
encryption, and generally parsing key files. It now can do
all we need.

Change-Id: I392443e040cce150a9575d18795a7cb8195a3515
Signed-off-by: Thomas Wolf <twolf@apache.org>
3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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

3 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"

3 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

3 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

3 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

3 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

3 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."

3 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

3 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

4 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"

4 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

4 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

4 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"

4 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

4 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"

4 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

4 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

4 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

4 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>
5 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"

5 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

5 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)"

5 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

5 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>
5 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>
5 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>
5 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>
5 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

5 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

6 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"

6 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