]> source.dussan.org Git - jgit.git/log
jgit.git
2 months agoRemove deprecated RemoteSetUrlCommand#setUri method 45/1200245/2
Matthias Sohn [Fri, 30 Aug 2024 14:44:16 +0000 (16:44 +0200)]
Remove deprecated RemoteSetUrlCommand#setUri method

Change-Id: Ib9041be0d88dd837aa68eda2b00f3aa9ebc54c27

2 months agoRemove deprecated RemoteSetUrlCommand#setPush method 44/1200244/2
Matthias Sohn [Fri, 30 Aug 2024 14:42:59 +0000 (16:42 +0200)]
Remove deprecated RemoteSetUrlCommand#setPush method

Change-Id: I4026531148a7560179dae89c05424f256e6600d2

2 months agoRemove deprecated RemoteSetUrlCommand#setName method 43/1200243/2
Matthias Sohn [Fri, 30 Aug 2024 14:41:15 +0000 (16:41 +0200)]
Remove deprecated RemoteSetUrlCommand#setName method

Change-Id: I769e999b5990f83719e3c638da9dfd0be4c5b826

2 months agoRemove deprecated RemoteRemoveCommand#setName method 42/1200242/2
Matthias Sohn [Fri, 30 Aug 2024 14:40:21 +0000 (16:40 +0200)]
Remove deprecated RemoteRemoveCommand#setName method

Change-Id: I2bd2a213b4642283b11f787ffcbab29916e2c5e7

2 months agoMerge "Remove deprecated CheckoutCommand#setForce method" into stable-7.0
Luca Milanesio [Tue, 3 Sep 2024 13:47:49 +0000 (13:47 +0000)]
Merge "Remove deprecated CheckoutCommand#setForce method" into stable-7.0

2 months agoRemove deprecated CheckoutCommand#setForce method 49/1200449/1
Matthias Sohn [Fri, 30 Aug 2024 14:38:55 +0000 (16:38 +0200)]
Remove deprecated CheckoutCommand#setForce method

Change-Id: Ie0b59ec21fc8dbe18242bbb52cb794e5a02c1ed5

2 months agoRemove deprecated CheckoutCommand#setForce method 41/1200241/2
Matthias Sohn [Fri, 30 Aug 2024 14:38:55 +0000 (16:38 +0200)]
Remove deprecated CheckoutCommand#setForce method

Change-Id: I39cfbeba0171c66e0f03b7b3785313da55b1dcac

2 months agoRemove deprecated static AnyLongObjectId#equals method 40/1200240/2
Matthias Sohn [Fri, 30 Aug 2024 14:37:04 +0000 (16:37 +0200)]
Remove deprecated static AnyLongObjectId#equals method

Change-Id: Ie67b9a4a5e1972ec3aebf50e058a9aabf5a20099

2 months agoRemove deprecated LocalDiskRepositoryTestCase#create(boolean,boolean) 39/1200239/2
Matthias Sohn [Fri, 30 Aug 2024 14:32:30 +0000 (16:32 +0200)]
Remove deprecated LocalDiskRepositoryTestCase#create(boolean,boolean)

Change-Id: I9eff2d405b5302753ff2ec1d0eab431bdba69fe0

2 months agoMerge branch 'master' into stable-7.0 38/1200238/1
Matthias Sohn [Fri, 30 Aug 2024 12:45:16 +0000 (14:45 +0200)]
Merge branch 'master' into stable-7.0

* master:
  walks: Remove deprecated #createReachabilityChecker() method
  RepoCommand.RemoteReader: Remove @Deprecated method
  ReachabilityChecker: Remove @Deprecated method
  UploadPack: Remove @Deprecated classes and methods
  ObjectId: Add method to read an ObjectId from a ByteBuffer
  DfsPackFile: re-add metrics for bitmap index loads

Change-Id: I383c9784ced95dfd58f01454fd13b086b180d462

2 months agowalks: Remove deprecated #createReachabilityChecker() method 06/1200306/1
Ivan Frade [Thu, 29 Aug 2024 22:47:15 +0000 (15:47 -0700)]
walks: Remove deprecated #createReachabilityChecker() method

Change-Id: If9375ac49fa82e988e0708d89f0f929495e6e7cc

2 months agoRepoCommand.RemoteReader: Remove @Deprecated method 05/1200305/1
Ivan Frade [Thu, 29 Aug 2024 22:45:15 +0000 (15:45 -0700)]
RepoCommand.RemoteReader: Remove @Deprecated method

Cleaning up before 7.0 release.

Change-Id: I83db715a8170a54957dd5bcf38df5b0911a12107

2 months agoReachabilityChecker: Remove @Deprecated method 04/1200304/1
Ivan Frade [Thu, 29 Aug 2024 22:43:22 +0000 (15:43 -0700)]
ReachabilityChecker: Remove @Deprecated method

Cleaning up before 7.0 release.

Change-Id: I620c3a485785b3d1efc950317fe552b8465a479e

2 months agoUploadPack: Remove @Deprecated classes and methods 03/1200303/1
Ivan Frade [Thu, 29 Aug 2024 22:40:49 +0000 (15:40 -0700)]
UploadPack: Remove @Deprecated classes and methods

The coming 7.0 release is a chance to clean up these deprecated
classes and methods.

Change-Id: I23d263c9244c1e0096eb7c96c290213c9e668a03

2 months agoObjectId: Add method to read an ObjectId from a ByteBuffer 01/1200301/2
Ivan Frade [Thu, 29 Aug 2024 22:13:47 +0000 (15:13 -0700)]
ObjectId: Add method to read an ObjectId from a ByteBuffer

Some storages return data in a convenient ByteBuffer wrapper, but
there is no straigh-forward method to read ObjectIds from it.

Add ObjectId#fromRaw(ByteBuffer) to read object ids from byte buffers.

Change-Id: Ia3b244005e4d9a613294f5ad9dab3b8e7bc3d7df

2 months agoRemove unused API warning filters 48/1200148/1
Matthias Sohn [Wed, 28 Aug 2024 15:15:19 +0000 (17:15 +0200)]
Remove unused API warning filters

Change-Id: If5cfd8963db0699669be3594e844e14d38f97943

2 months agoObjectDirectoryTest: ensure WindowCursor is closed 47/1200147/1
Matthias Sohn [Wed, 28 Aug 2024 15:12:41 +0000 (17:12 +0200)]
ObjectDirectoryTest: ensure WindowCursor is closed

Change-Id: I75b7d36181a0d404d4e3dca17b9e436892d97b42

2 months agoPackExtBlockCacheTableTest: fix empty block warning 46/1200146/1
Matthias Sohn [Wed, 28 Aug 2024 15:10:04 +0000 (17:10 +0200)]
PackExtBlockCacheTableTest: fix empty block warning

Change-Id: I35e7527c6c555cd57fce14889412fa2fd6beab88

2 months agoPackExtBlockCacheTableTest: suppress unchecked conversion warnings 45/1200145/1
Matthias Sohn [Wed, 28 Aug 2024 15:09:16 +0000 (17:09 +0200)]
PackExtBlockCacheTableTest: suppress unchecked conversion warnings

Change-Id: I5fcad7a824c4a320683d11da52c4e2035231f85d

2 months agoPackObjectSizeIndexV1: fix boxing warnings 44/1200144/1
Matthias Sohn [Wed, 28 Aug 2024 14:13:42 +0000 (16:13 +0200)]
PackObjectSizeIndexV1: fix boxing warnings

Change-Id: I25e6194fb8bf09dcac1613cec8349c3893a4f81a

2 months agoPackExtBlockCacheTableTest: suppress boxing warning on test class 43/1200143/1
Matthias Sohn [Wed, 28 Aug 2024 14:10:39 +0000 (16:10 +0200)]
PackExtBlockCacheTableTest: suppress boxing warning on test class

Change-Id: Ie9d5da0c065ba0118927d530ed589952fb3b2c2b

2 months agoDfsBlockCacheConfigTest: suppress boxing warning on test class 42/1200142/1
Matthias Sohn [Wed, 28 Aug 2024 14:09:38 +0000 (16:09 +0200)]
DfsBlockCacheConfigTest: suppress boxing warning on test class

Change-Id: Ibe7edc5e53c3d467e0e6144a3f8a32989f1ac6af

2 months agoSuppress non-externalized string warnings 41/1200141/1
Matthias Sohn [Wed, 28 Aug 2024 14:08:04 +0000 (16:08 +0200)]
Suppress non-externalized string warnings

for texts which don't need to be translatable.

Change-Id: Iacac5df9525ddbc9942b7c440450b6aad4864135

2 months agoUpdate jakarta.servlet:jakarta.servlet-api to 6.1.0 38/1200138/2
Matthias Sohn [Wed, 28 Aug 2024 13:22:42 +0000 (15:22 +0200)]
Update jakarta.servlet:jakarta.servlet-api to 6.1.0

Change-Id: Ie95e0247e6a23a16343e0f644d613dfe95fd2d1e

2 months agoUpdate org.apache.commons:commons-compress to 1.27.1 37/1200137/2
Matthias Sohn [Wed, 28 Aug 2024 12:59:04 +0000 (14:59 +0200)]
Update org.apache.commons:commons-compress to 1.27.1

Change-Id: Ibd48bfe5ec3fdd3d52d755dc4881e013aae21d5d

2 months agoUpdate org.tukaani:xz to 1.10 36/1200136/1
Matthias Sohn [Wed, 28 Aug 2024 11:55:15 +0000 (13:55 +0200)]
Update org.tukaani:xz to 1.10

Change-Id: Ibd565d4d4e5ef0dd32514fdc6d73b44c25aaa27f

2 months agoUpdate org.assertj:assertj-core to 3.26.3 35/1200135/1
Matthias Sohn [Wed, 28 Aug 2024 11:43:12 +0000 (13:43 +0200)]
Update org.assertj:assertj-core to 3.26.3

Change-Id: I37816b1700bbcd102eb5b1b2591ba493edea4b36

2 months agoUpdate org.apache.commons:commons-lang3 to 3.16.0 34/1200134/1
Matthias Sohn [Wed, 28 Aug 2024 09:40:37 +0000 (11:40 +0200)]
Update org.apache.commons:commons-lang3 to 3.16.0

Change-Id: I7ec0cf1090aab26c1b1f70f816963fba63405034

2 months agoUpdate bytebuddy to 1.15.0 93/1199793/1
Matthias Sohn [Wed, 28 Aug 2024 00:05:00 +0000 (02:05 +0200)]
Update bytebuddy to 1.15.0

Change-Id: Idec6369bb5da997e532b912c2984b51e77a3ac0d

2 months agoUpdate commons-logging:commons-logging to 1.3.4 92/1199792/1
Matthias Sohn [Tue, 27 Aug 2024 23:53:53 +0000 (01:53 +0200)]
Update commons-logging:commons-logging to 1.3.4

Change-Id: I3dba27df9425484fdc630b067ddb19a2425aa891

2 months agoUpdate commons-codec:commons-codec to 1.17.1 91/1199791/1
Matthias Sohn [Tue, 27 Aug 2024 23:47:45 +0000 (01:47 +0200)]
Update commons-codec:commons-codec to 1.17.1

Change-Id: Ie78b1479ec95632981033342e65d546fc7bd905d

2 months agoUpdate jetty to 12.0.12 90/1199790/2
Matthias Sohn [Wed, 28 Aug 2024 06:49:51 +0000 (08:49 +0200)]
Update jetty to 12.0.12

Change-Id: I8b4381fcd067280050f31d6b8526c9f409244b55

2 months agoPrepare 7.0.0-SNAPSHOT builds 89/1199789/1
Matthias Sohn [Tue, 27 Aug 2024 23:50:51 +0000 (01:50 +0200)]
Prepare 7.0.0-SNAPSHOT builds

Change-Id: Ifa0a549e9551a2016241169e1c1e9052174c49d1

2 months agoDfsPackFile: re-add metrics for bitmap index loads 01/1200101/2
Sam Delmerico [Tue, 27 Aug 2024 20:27:35 +0000 (13:27 -0700)]
DfsPackFile: re-add metrics for bitmap index loads

The calculations for readBitmapIdxBytes and readBitmapIdxMicros
metrics were unintentionally removed in
https://gerrithub.io/c/eclipse-jgit/jgit/+/1177262, so this change
adds those metrics back.

Change-Id: I7ac7769acd092680933a27b2b3e70dd67690cfbf

2 months agoJGit v7.0.0.202408271414-rc1 87/1199787/1 v7.0.0.202408271414-rc1
Matthias Sohn [Tue, 27 Aug 2024 14:15:14 +0000 (16:15 +0200)]
JGit v7.0.0.202408271414-rc1

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

2 months agoMerge branch 'master' into stable-7.0 84/1199784/1
Matthias Sohn [Tue, 27 Aug 2024 13:13:37 +0000 (15:13 +0200)]
Merge branch 'master' into stable-7.0

* master:
  DfsReaderIoStats: getters to object size index micros/bytes
  Do not set headers if response is already committed
  AmazonS3: Ensure SAXParserFactory sets valid/expected input params
  Signing: refactor interfaces
  Add a missing license header
  LockFile: Retry lock creation if parent dirs were removed
  GpgConfig: Add missing @since
  DfsReaderIoStats: Order fields and methods consistently

Change-Id: I81bf15379c25e3ba69dda222c6980648fff07ec5

2 months agoDfsReaderIoStats: getters to object size index micros/bytes 56/1199756/2
Ivan Frade [Tue, 20 Aug 2024 19:54:04 +0000 (12:54 -0700)]
DfsReaderIoStats: getters to object size index micros/bytes

These properties of the stats object don't have a getter and it is
required to export those values in logs.

Change-Id: I7f91a38ee4d02668aff1cbc8424ea669cdb1d2f7

2 months agoMerge branch 'stable-6.10' 82/1199782/1
Matthias Sohn [Tue, 27 Aug 2024 08:52:27 +0000 (10:52 +0200)]
Merge branch 'stable-6.10'

* stable-6.10:
  AmazonS3: Ensure SAXParserFactory sets valid/expected input params
  LockFile: Retry lock creation if parent dirs were removed

Change-Id: I599f698f812e11ae37843cac2333c9971ec30dd8

2 months agoDo not set headers if response is already committed 96/1199396/2
Max Haslbeck [Tue, 13 Aug 2024 11:16:53 +0000 (13:16 +0200)]
Do not set headers if response is already committed

This fixes issues when the response headers were already set and sent
to the client. In all other cases this is a no-op.

Change-Id: Ifb429e78f721cc514bb6eb1a3ef3412425cd2f1c
Signed-off-by: Max Haslbeck <haslbeck@google.com>
2 months agoAmazonS3: Ensure SAXParserFactory sets valid/expected input params 81/1199781/2
Matthias Sohn [Mon, 26 Aug 2024 23:31:44 +0000 (01:31 +0200)]
AmazonS3: Ensure SAXParserFactory sets valid/expected input params

Change Ie8a9d411fc19e8b7bf86c0b4df0b02153a0e9444 broke setting
valid/expected input parameters for the XML parser. This can be fixed
by calling SaxParserFactory#setNamespaceAware, see [1]. Also see earlier
fix in [2].

[1] https://stackoverflow.com/questions/24891323/namespace-handling-with-sax-in-java
[2] I05e993032ab3a6afb78634290b578ebc73cf1cbd

Bug: jgit-87
Change-Id: Id4e9eebac8d9de81e5d48a608066db3cc862e15c

2 months agoSigning: refactor interfaces 21/1199821/3
Thomas Wolf [Tue, 20 Aug 2024 20:41:45 +0000 (22:41 +0200)]
Signing: refactor interfaces

This is a big API-breaking change cleaning up the signing interfaces.

Initially, these interfaces were GPG/OpenPGP-specific. When EGit added
new signers and signature verifiers that called an external GPG
executable, they were found inadequate and were extended to be able to
pass in the GpgConfig to get access to the "gpg.program" setting.

With the introduction of X.509 S/MIME signing, it was discovered that
the interfaces were still not quite adequate, and the "Gpg" prefix on
the class names were confusing.

Since 7.0 is a major version bump, I'm taking this chance to overhaul
these interfaces from ground up.

For signing, there is a new Signer interface. With it goes a
SignerFactory SPI interface, and a final Signers class managing the
currently set signers. By default, signers for the different signature
types are created from the signer factories, which are discovered via
the ServiceLoader. External code can install its own signers, overriding
the default factories.

For signature verification, exactly the same mechanism is used.

This simplifies the setup of signers and signature verifiers, and makes
it all more regular. Signer instances just get a byte[] to sign and
don't have to worry about ObjectBuilders at all. SignatureVerifier
instances also just get the data and signature as byte[] and don't have
to worry about extracting the signature from a commit or tag, or about
what kind of signature it is.

Both Signers and SignatureVerifiers always get passed the Repository
and the GpgConfig. The repository will be needed in an implementation
for SSH signatures because gpg.ssh.* configs may need to be loaded
explicitly, and some of those values need the current workspace
location.

For signature verification, there is exactly one place in core JGit in
SignatureVerifiers that extracts signatures, determines the signature
type, and then calls the right signature verifier.

Change RevTag to recognize all signature types known in git (GPG, X509,
and SSH).

Change-Id: I26d2731e7baebb38976c87b7f328b63a239760d5
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 months agoAdd a missing license header 91/1199991/1
Thomas Wolf [Thu, 22 Aug 2024 21:11:39 +0000 (23:11 +0200)]
Add a missing license header

Change-Id: Iccb922ea73b0bfd6360ea2182b88c520a951a0a2
Signed-off-by: Thomas Wolf <twolf@apache.org>
3 months agoLockFile: Retry lock creation if parent dirs were removed 25/1199825/2
Kaushik Lingarkar [Tue, 20 Aug 2024 22:50:20 +0000 (15:50 -0700)]
LockFile: Retry lock creation if parent dirs were removed

In the small window between creation of the lock file's parent dirs and
the lock file itself, the parent dirs may be cleaned by an external
process packing refs in the repository. When this scenario occurs, retry
creating the lock file (along with its parent dirs).

Change-Id: Id7ec60c3f7f373b59f1dc8de6b8fa6df6bdf2570
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
3 months agoGpgConfig: Add missing @since 20/1199820/2
Thomas Wolf [Tue, 20 Aug 2024 20:40:10 +0000 (22:40 +0200)]
GpgConfig: Add missing @since

Change-Id: Ie56e7d8f2defe10a87565056a1763288d5b1e1a6
Signed-off-by: Thomas Wolf <twolf@apache.org>
3 months agoPrepare 7.0.0-SNAPSHOT builds
Matthias Sohn [Wed, 21 Aug 2024 14:37:28 +0000 (16:37 +0200)]
Prepare 7.0.0-SNAPSHOT builds

Change-Id: I07b258a9f94823c9c390daf6e1d3034ca5ace81f

3 months agoJGit v7.0.0.202408202050-m3 76/1199776/1
Matthias Sohn [Tue, 20 Aug 2024 20:51:02 +0000 (22:51 +0200)]
JGit v7.0.0.202408202050-m3

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

3 months agoDfsReaderIoStats: Order fields and methods consistently 55/1199755/1
Ivan Frade [Tue, 20 Aug 2024 18:56:41 +0000 (11:56 -0700)]
DfsReaderIoStats: Order fields and methods consistently

As fields and getters were added, we didn't respect the (hard to see)
existing order.

Reorder with the following criteria:

Methods:
 xCacheHits() (for all indexes in index order),
 xCount()     (same),
 xBytes()     (same),
 xMicros()    (same).

Index order: primary, reverse, bitmap, commit-graph, object-size

Change-Id: I28f1d8121070d4357d566e3683947a26ceb3ba04

3 months agoJGit v7.0.0.202408201547-m3 73/1199473/1 v7.0.0.202408201547-m3
Matthias Sohn [Tue, 20 Aug 2024 15:47:36 +0000 (17:47 +0200)]
JGit v7.0.0.202408201547-m3

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

3 months agoJGit v7.0.0.202409201410-m3 71/1199471/1 v7.0.0.202409201410-m3
Matthias Sohn [Tue, 20 Aug 2024 14:13:24 +0000 (16:13 +0200)]
JGit v7.0.0.202409201410-m3

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

3 months agoMerge branch 'master' into stable-7.0 70/1199470/1
Matthias Sohn [Tue, 20 Aug 2024 13:51:15 +0000 (15:51 +0200)]
Merge branch 'master' into stable-7.0

* master:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  [ssh] Bump Apache MINA sshd 2.13.1 -> 2.13.2
  ConfigConstants: Add missing @since 7.0
  Fix "Comparison of narrow type with wide type in loop condition"
  ObjectWalk: Remove duplicated word "the" in class documentation
  RepoProject: read the 'dest-branch' attribute of a project
  Make RepoProject#setUpstream public
  RepoCommand: Add error to ManifestErrorException
  RepoCommand: Copy manifest upstream into .gitmodules ref field
  RepoProject: read the "upstream" attribute of a project
  JGit v5.13.3.202401111512-r

Change-Id: Ic40667e3a79b1f2a91a6a7278f2ac8bc1bdb2334

3 months agoMerge branch 'stable-6.10' 65/1199465/3
Matthias Sohn [Tue, 20 Aug 2024 13:26:41 +0000 (15:26 +0200)]
Merge branch 'stable-6.10'

* stable-6.10:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  RepoProject: read the 'dest-branch' attribute of a project
  Make RepoProject#setUpstream public
  RepoCommand: Add error to ManifestErrorException
  RepoCommand: Copy manifest upstream into .gitmodules ref field
  RepoProject: read the "upstream" attribute of a project
  JGit v5.13.3.202401111512-r

Change-Id: If67534f8954703e107e8477456325af3d868612c

3 months agoMerge branch 'stable-6.9' into stable-6.10 64/1199464/3
Matthias Sohn [Tue, 20 Aug 2024 13:21:43 +0000 (15:21 +0200)]
Merge branch 'stable-6.9' into stable-6.10

* stable-6.9:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I68e73b6e0c6cda003bc18b3e82266c1d8a1f183e

3 months agoMerge branch 'stable-6.8' into stable-6.9 63/1199463/3
Matthias Sohn [Tue, 20 Aug 2024 13:20:37 +0000 (15:20 +0200)]
Merge branch 'stable-6.8' into stable-6.9

* stable-6.8:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I29478165b8304316713ffd6a4c6d669dd5760c88

3 months agoMerge branch 'stable-6.7' into stable-6.8 62/1199462/3
Matthias Sohn [Tue, 20 Aug 2024 12:56:04 +0000 (14:56 +0200)]
Merge branch 'stable-6.7' into stable-6.8

* stable-6.7:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I513a1cbb2bfd002d125b04f7944a625ca52decea

3 months agoMerge branch 'stable-6.6' into stable-6.7 61/1199461/3
Matthias Sohn [Tue, 20 Aug 2024 12:54:08 +0000 (14:54 +0200)]
Merge branch 'stable-6.6' into stable-6.7

* stable-6.6:
  Update tycho to 4.0.8
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I79bb467325e5c09d93e0220be8233ba0d91562cb

3 months agoMerge branch 'stable-6.5' into stable-6.6 60/1199460/3
Matthias Sohn [Tue, 20 Aug 2024 12:28:33 +0000 (14:28 +0200)]
Merge branch 'stable-6.5' into stable-6.6

* stable-6.5:
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I54d1776b3ea096d458b8005e70c02e7edef71c2b

3 months agoUpdate tycho to 4.0.8 67/1199467/1
Matthias Sohn [Tue, 20 Aug 2024 12:25:31 +0000 (14:25 +0200)]
Update tycho to 4.0.8

Change-Id: I0d6b99c07734bed166a16d7ce489c34286f29c82

3 months agoMerge branch 'stable-6.4' into stable-6.5 59/1199459/2 stable-6.5
Matthias Sohn [Sun, 18 Aug 2024 16:35:29 +0000 (18:35 +0200)]
Merge branch 'stable-6.4' into stable-6.5

* stable-6.4:
  Update org.eclipse.dash:license-tool-plugin to 1.1.0
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: Ieae366586ac4c449a4f9454dc4b63513e7573776

3 months agoMerge branch 'stable-6.3' into stable-6.4 58/1199458/2 stable-6.4
Matthias Sohn [Sun, 18 Aug 2024 16:33:59 +0000 (18:33 +0200)]
Merge branch 'stable-6.3' into stable-6.4

* stable-6.3:
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: Ia9eefc4004ca01d97ff0c4dae9a6220d48e76b88

3 months agoUpdate org.eclipse.dash:license-tool-plugin to 1.1.0 66/1199466/1
Matthias Sohn [Wed, 14 Aug 2024 21:17:13 +0000 (23:17 +0200)]
Update org.eclipse.dash:license-tool-plugin to 1.1.0

Change-Id: Idb5c74f75110edc35e8a89de52aca8392acb297f

3 months agoMerge branch 'stable-6.2' into stable-6.3 57/1199457/1 stable-6.3
Matthias Sohn [Wed, 14 Aug 2024 08:51:16 +0000 (10:51 +0200)]
Merge branch 'stable-6.2' into stable-6.3

* stable-6.2:
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I6bce3a4d64a617d74d0cbf4e79887b067e1ea2c5

3 months agoMerge branch 'stable-6.1' into stable-6.2 56/1199456/1 stable-6.2
Matthias Sohn [Wed, 14 Aug 2024 07:25:43 +0000 (09:25 +0200)]
Merge branch 'stable-6.1' into stable-6.2

* stable-6.1:
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: Ib536297ef20a75b36cff8f41d57855913f7d7f26

3 months agoMerge branch 'stable-6.0' into stable-6.1 55/1199455/1 stable-6.1
Matthias Sohn [Wed, 14 Aug 2024 07:24:40 +0000 (09:24 +0200)]
Merge branch 'stable-6.0' into stable-6.1

* stable-6.0:
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: I23afe07585ff17ad8486cbe2c667f6acbe912542

3 months agoMerge branch 'stable-5.13' into stable-6.0 54/1199454/1 stable-6.0
Matthias Sohn [Wed, 14 Aug 2024 06:57:35 +0000 (08:57 +0200)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Fix "Comparison of narrow type with wide type in loop condition"
  JGit v5.13.3.202401111512-r

Change-Id: Ib15aa83972d81986959889dc03e943fe55c78873

3 months ago[ssh] Bump Apache MINA sshd 2.13.1 -> 2.13.2 80/1199280/1
Thomas Wolf [Sat, 10 Aug 2024 17:36:50 +0000 (19:36 +0200)]
[ssh] Bump Apache MINA sshd 2.13.1 -> 2.13.2

Apache MINA 2.13.[01] had a bug in the new sntrup761x25519-sha256 KEX
exchange that was fixed in 2.13.2.[1]

This is the only upstream code change. Bump the lower bound in the
MANIFEST.MFs to 2.13.2 to avoid we ever use the broken 2.13.[01].

[1] https://github.com/apache/mina-sshd/issues/525

Change-Id: I5904f9826f99c46b50abc634153f90035646ce50
Signed-off-by: Thomas Wolf <twolf@apache.org>
3 months agoConfigConstants: Add missing @since 7.0 79/1199279/1
Thomas Wolf [Sat, 10 Aug 2024 17:27:07 +0000 (19:27 +0200)]
ConfigConstants: Add missing @since 7.0

Change-Id: I1ea31c1f0735b7c8fd09fbedc413d613e4baa803
Signed-off-by: Thomas Wolf <twolf@apache.org>
3 months agoFix "Comparison of narrow type with wide type in loop condition" 67/1198667/1 stable-5.13
Matthias Sohn [Fri, 9 Aug 2024 09:53:01 +0000 (11:53 +0200)]
Fix "Comparison of narrow type with wide type in loop condition"

This issue was detected by a GitHub CodeQL security scan run on JGit
source code.

Description of the error raised by the security scan:
"In a loop condition, comparison of a value of a narrow type with a
value of a wide type may always evaluate to true if the wider value is
sufficiently large (or small). This is because the narrower value may
overflow. This can lead to an infinite loop."

Fix this by using type `long` for the local variable `done`.

Change-Id: Ibd4f71299e3f2e40d4331227bd143569a4264d8c

3 months agoObjectWalk: Remove duplicated word "the" in class documentation 45/1197545/3
Sergey Zakharov [Sun, 21 Jul 2024 13:06:19 +0000 (16:06 +0300)]
ObjectWalk: Remove duplicated word "the" in class documentation

Change-Id: I0ca0b5fc65b5cafc768a053b1de40aea9f14231c

3 months agoMerge branch 'stable-7.0' 65/1198665/1
Matthias Sohn [Thu, 8 Aug 2024 08:09:19 +0000 (10:09 +0200)]
Merge branch 'stable-7.0'

* stable-7.0:
  Prepare 7.0.0-SNAPSHOT builds
  JGit v7.0.0.202407311305-m2

Change-Id: I5052f81b453b9a3b2836e7eb15a58f2ff169956f

3 months agoPrepare 7.0.0-SNAPSHOT builds 63/1198663/1
Matthias Sohn [Thu, 1 Aug 2024 12:19:32 +0000 (14:19 +0200)]
Prepare 7.0.0-SNAPSHOT builds

Change-Id: Ic84217b6e8fb43e78b622883eb670ee135c75bbb

3 months agoJGit v7.0.0.202407311305-m2 58/1198658/1 v7.0.0.202407311305-m2
Matthias Sohn [Wed, 31 Jul 2024 13:04:38 +0000 (15:04 +0200)]
JGit v7.0.0.202407311305-m2

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

3 months agoMerge branch 'master' into stable-7.0 57/1198657/1
Matthias Sohn [Wed, 31 Jul 2024 13:02:55 +0000 (15:02 +0200)]
Merge branch 'master' into stable-7.0

* master:
  Lib: Fix ssh value for gpg.format throwing an IllegalArgumentException
  DfsPackFile: Abstract the loading of pack indexes
  PackExtBlockCacheTable: spread extensions over multiple dfs tables
  PackObjectSizeIndex: Read all bytes and use the byte[] directly
  DfsPackFile: Do not set local reverse index ref from cache callback
  Add 4.33 target platform for Eclipse 2024-09
  DfsBlockCacheTable: extract stats get* methods to interface
  Add worktrees read support
  DfsBlockCacheConfig: support configurations for dfs cache tables per extensions
  ssh: Remove .orig file
  DfsPackFile: Enable/disable object size index via DfsReaderOptions

Change-Id: Ie123851a784e8a0f7197543898c0c8fb920e4f31

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"

3 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 agoRepoProject: read the 'dest-branch' attribute of a project 58/1197358/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
(cherry picked from commit 47fd412affd8d7578606ae9b3015a911b71b13ed)

4 months agoMake RepoProject#setUpstream public 57/1197357/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
(cherry picked from commit e3e0a1ea35a27e50e0280715a417be7d69fa3345)

4 months agoRepoCommand: Add error to ManifestErrorException 56/1197356/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
(cherry picked from commit b41187429359cf9830fd34368d28a454653e187d)

4 months agoRepoCommand: Copy manifest upstream into .gitmodules ref field 55/1197355/1
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
(cherry picked from commit 48465f84014904edddcdd48258c67bc19555d4c3)

4 months agoRepoProject: read the "upstream" attribute of a project 54/1197354/1
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
(cherry picked from commit 1dd6324d4b4d9596813b18a44e315295f559ea12)

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