]> source.dussan.org Git - jgit.git/log
jgit.git
11 hours agoDiffDriver: fix formatting of javadoc 83/1204283/1
Matthias Sohn [Wed, 20 Nov 2024 22:42:39 +0000 (23:42 +0100)]
DiffDriver: fix formatting of javadoc

Change-Id: I01da1862719b6623727deae10a706f30ee6cabbf

21 hours agoMerge "Add numberOfObjectsSinceBitmap to RepoStatistics" into stable-6.10
Matthias Sohn [Wed, 20 Nov 2024 12:36:42 +0000 (12:36 +0000)]
Merge "Add numberOfObjectsSinceBitmap to RepoStatistics" into stable-6.10

23 hours agoAdd numberOfObjectsSinceBitmap to RepoStatistics 98/1203398/8
Jacek Centkowski [Thu, 31 Oct 2024 17:30:02 +0000 (18:30 +0100)]
Add numberOfObjectsSinceBitmap to RepoStatistics

Introduce a numberOfObjectsSinceBitmap that contains the number of
objects stored in pack files and as loose objects created since the
latest bitmap generation.

Note that the existing
GcNumberOfPackFilesAfterBitmapStatisticsTest.java was renamed to
GcSinceBitmapStatisticsTest.java and extended to cover also this
statistic.

Change-Id: I8ae1db142ddfcd42a5a1d6da01bc67f695562e0e

23 hours agoMerge "Don't fail when trying to prune pack which is already gone" into stable-6.10
Luca Milanesio [Wed, 20 Nov 2024 10:27:20 +0000 (10:27 +0000)]
Merge "Don't fail when trying to prune pack which is already gone" into stable-6.10

23 hours agoMerge "Support built-in diff drivers for hunk header function names" into stable...
Matthias Sohn [Wed, 20 Nov 2024 10:23:10 +0000 (10:23 +0000)]
Merge "Support built-in diff drivers for hunk header function names" into stable-6.10

24 hours agoSupport built-in diff drivers for hunk header function names 34/1203734/10
Kaushik Lingarkar [Tue, 19 Nov 2024 17:37:33 +0000 (09:37 -0800)]
Support built-in diff drivers for hunk header function names

The regexes defined for each built-in driver will be used to determine
the function name for a hunk header. Each driver can specify a list of
regexes to negate and match. They can also define pattern compilation
flags if needed. These drivers only apply to text files with unified
patch type.

Following built-in drivers have been added:
- cpp
- dts
- java
- python
- rust

Support for more languages can be added as needed to match the cgit
implementation.

Change-Id: Ice5430bfed7e4aaf9f00e52e44402479984953c5

25 hours agoDon't fail when trying to prune pack which is already gone 25/1203925/3
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 the prunePacked function is called in
`TestRepository.packAndPrune` function after the repo moves on after
GC was performed.

Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c

9 days agoRename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap 24/1203924/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

11 days 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)

11 days 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)

13 days 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

13 days 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 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

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

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

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

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

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)

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

Change-Id: I3384e7405cadf063e7b0dd25468a8651c45628ac

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

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

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

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

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

Change-Id: I64f6d6a0599cbab462dca236c00e6f3314b2a810

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

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

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

This reverts commit 76ce6d91a2e07fdfcbfc8df6970c9e98a98e36a0.

Change-Id: I1f8df6562304c64b192da11538c02230f0084a43

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

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

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

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

Change-Id: I8245cb32a27329dfdd05e6cb80be846ecf62b800

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

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

Change-Id: I0f55c1d5cd529aa510029054e6f05bd2637d1bca

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

Change-Id: Idc4c95e643ea46c2b2e33f9a60b0477185429588

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

Change-Id: I3f0131cd168ba9c814341416198f955a6d5b340f

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

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

Change-Id: Id8eea614b6b8d54c62b49ffbac90599e6f4c5efa

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

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

Change-Id: I18defa627ad2223a3a917d2b0ee4189396732533

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

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

Change-Id: Iac5ca095d3e93176e21364a66a29c5e533168e16

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

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

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

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

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

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

Change-Id: I075ae7fa40e6c883897c8a7ec5ce422b4e808ef6

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

Change-Id: I5fb1228199159c82d426dcb22aabd39411f381c7

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

Change-Id: I420f24086948b28328f7120c1b22f4de33da0e78

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

Change-Id: I71d1fb6c6e7ce8ab121e77ffbc05b14fd47879f1

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

Change-Id: I9013309b218fafec7d1e70c98fb32a683ecc7a0b

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

Change-Id: If26a3d7f26d3e46bf22a23f590cd289baaaa167f

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

Change-Id: I3bb8f751c8c7ab630eb8b4eab3e24f354d1a10e7

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

Change-Id: I0487adb0d3c7fef0841e3fb200d9df78ee27e9e4

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

Change-Id: I695e424a44cac2119656ceacfbe1a7abb5f4d7b5

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

Change-Id: Id322cef408ce9ddac3febc8963794f5958c06d3e

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

Change-Id: I60d5aae001583671a01a8c38e98e36a7293b34eb

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

Change-Id: I845e101876543a6b5fb197eefa7e73029b9e4809

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

which is required by tycho 4.0.7.

Change-Id: I7ed1bda89c8712a0a1bb47bdf77e4b7f9f66c039

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

Change-Id: I280b649a9d4bcaf829c7949a99c129d107eec822

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

Change-Id: Icc7d5840536dd9f4ef4137c8e5ec35f687c3de4a

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

Change-Id: Ifcab62d1ed7837258c257cac3a862668fe9db923

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

Change-Id: I282498fee64bcfb542a063413b55821efc77302b

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

Change-Id: Iaf958d05f31cd03d1f4d7ba64610abdee85bf63d

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

Change-Id: Ibbd8e1675e3b8c67af0e13de16c470db108d3a0f

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

Change-Id: I5b6d5c23d504fac386ae04c42b735152fbbcd7ae

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

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

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

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

Change-Id: I819685f7f6d6ebcf8f179dd3133e7fc809bba392

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

Change-Id: I1d7bf0fb66d329aad24b512bed082e3f74a5b2a8

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

Change-Id: Ia8dec10b4d487611a9cad2268764fa53fcd35c47

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

Change-Id: Ife807c38cd163a75a70e91610127b01807be2f68

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

[1] replaces Iterator.remove() with a list of "toRemove" that gets
processed when returning at the end. There are two others returns in
the function where the list is not processed.

Let the method report the broken packages and wrap it so the caller
can clean them up in any case.

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

Change-Id: I1ffb7829039f644df03b0b3ea1e5d10408ce19b7

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

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

In https://gerrithub.io/c/eclipse-jgit/jgit/+/1194015, LinkedList was
replaced with ArrayList in DfsReader and WalkFetchConnection. In this
case, the Iterator.remove() method of List is called, which is an O(n)
operation for ArrayList. This results in an O(n^2) algorithm.

Instead of reverting to LinkedList, use a HashSet and LinkedHashmap
instead. This maintains O(1) removal, and is less likely to be treated
as an antipattern than LinkedList.

A likely innocuous usage of Iterator.remove() in UnionInputStream was
also fixed.

Change-Id: I57d884440c726b2fc80c1b8b2bec9bd7e2e6e3fe

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

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

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

Change-Id: Ie3ac82a8160c605e27ee3167e3640cd76b1b2a76

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

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

In some settings, we want to let users apply a patch that does
not cleanly apply and add conflict markers. In Gerrit, this is
useful when cherry picking (via Git patches) from one host to
another.

This commit takes a simple approach: If a hunk doesn't apply,
go to the pre-image line, treat all lines in pre-image length
as left side of the conflict and all context and newly added
lines as right side of the conflict.

Change-Id: I01411d7a32b3f3207097b26231909aae6b835650

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

Change-Id: I12e4d0fd48b5b7420d421874c8d63caed9628266

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

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

Change-Id: I082ffb2073f86d21deb4b51a24e53de9371b765e

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

and
- add orbit-4.32
- update objenesis to 3.4

Change-Id: Ia9df427eb3c97f867caaffbc92674fb750433aad

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

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

Commit a44b9e8bf changed the logic so that we try to read a public key
from the file given first, and only then try the file with the ".pub"
extension. Unfortunately the exception handling was not sufficient to
correctly deal with the given file containing a private key.

Apache MINA SSHD may throw a StreamCorruptedException when one tries
to read a public key from a file containing a private key. Handle
this exception in addition to GeneralSecurityException, and change
the order of exception handlers because StreamCorruptedException is
an IOException.

Bug: jgit-53
Change-Id: I7dddc2c11aa75d7663f7fe41652df612bf8c88cd
Signed-off-by: Thomas Wolf <twolf@apache.org>
6 months agoUpdate mina-sshd to 2.12.1 21/1194621/2
Matthias Sohn [Mon, 13 May 2024 00:06:38 +0000 (02:06 +0200)]
Update mina-sshd to 2.12.1

Change-Id: I3f7b76243af0add3ee66a7f808a73f10d01a7627

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

Change-Id: Ie5192a7c02c60e26c7c76f618b05f24307afcc63