Commit Graph

9748 Commits

Author SHA1 Message Date
Matthias Sohn b54592c8ee Prepare 6.9.0-SNAPSHOT builds
Change-Id: Id1d784ec4870cfb53c4b140fe0bb3fad9eef651d
2023-12-04 23:02:44 +01:00
Matthias Sohn c1e5bd348d Merge branch 'stable-6.8'
* stable-6.8:
  Prepare 6.8.1-SNAPSHOT builds
  JGit v6.8.0.202311291450-r
  Rename method parameter to fix warning about hidden field
  Fix warnings about empty control flow statements
  BitmapIndexImpl: externalize error message
  Suppress not-externalized string warnings
  Silence API error for new method BitmapIndex#addBitmapLookupListener
  Update Orbit to orbit-aggregation/2023-12
  Prepare 6.8.0-SNAPSHOT builds
  JGit v6.8.0.202311212206-rc1

Change-Id: Ie88662f6458bb80147c7c164424eebd8b8240fc7
2023-12-04 22:58:45 +01:00
Ivan Frade 8ea5409ec1 BitmapWalkerTest: New test for the walker
Change-Id: I414f5bdd86e5623d7669fa187df19e06acd02cef
2023-11-30 11:58:32 -08:00
Ivan Frade 5e563e1ba1 PackWriter: store the objects with bitmaps in the statistics
We want to know what objects had bitmaps in the walk of the
request. We can check their position in the history and evaluate
our bitmap selection algorithm.

Use the listener interface of the BitmapWalker to get the objects
walked with bitmaps and store them in the statistics.

Change-Id: Id15a904eb642d7f50d80ac77d1146db4fe4706eb
2023-11-30 11:58:32 -08:00
Ivan Frade 5552242588 FooterLine: First line cannot be a footer
The first line of the commit message cannot be a footer line. This
restriction was dropped in commit [1] while adding multiline
footers. This affects at least the git-numberer gerrit plugin, that
even have a test for it [2].

Reintroduce the restriction that the first line of the commit message
cannot be a footer and bring the test from git-numberer to jgit.

[1] https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1172664
[2] https://chromium.googlesource.com/infra/gerrit-plugins/git-numberer/+/refs/heads/main/src/test/java/com/googlesource/chromium/plugins/gitnumberer/GetFooterLinesTest.java

Change-Id: Id3fa6b8614664dbc3fdccffe1006b0b9752a8de6
2023-11-29 14:18:12 -08:00
Ivan Frade acf97be2d6 Reapply "Improve footer parsing to allow multiline footers."
This reverts commit e99fb6edc4.
2023-11-29 13:44:02 -08:00
Ivan Frade e99fb6edc4 Revert "Improve footer parsing to allow multiline footers."
This reverts commit 340cc787a0.

This breaks a test in the git_numberer gerrit plugin used by chromium
[1].  The test checks that first line is never a footer, which sounds
right. That test should be included in FooterLineTest.

[1]
https://chromium.googlesource.com/infra/gerrit-plugins/git-numberer/+/refs/heads/main/src/test/java/com/googlesource/chromium/plugins/gitnumberer/GetFooterLinesTest.java
2023-11-29 10:05:07 -08:00
Matthias Sohn 796fb2e5c7 Prepare 6.8.1-SNAPSHOT builds
Change-Id: I56458c5345dcd9544868c948e90c9827d25c6850
2023-11-29 16:53:24 +01:00
Matthias Sohn c43560487b JGit v6.8.0.202311291450-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Iecfe3f628cfdc437ee0d63fe52653ef952c8c494
2023-11-29 15:49:43 +01:00
Matthias Sohn 6514a46a3b Rename method parameter to fix warning about hidden field
Change-Id: Id094ab022f82db0f3eb220052adc0aed1cde2d50
2023-11-29 00:21:31 +01:00
Matthias Sohn 29ad7d56e8 Fix warnings about empty control flow statements
Change-Id: If1595ac148edf88a18efdd90c4f40d0ac719caab
2023-11-29 00:18:29 +01:00
Matthias Sohn e4abd0123b BitmapIndexImpl: externalize error message
Change-Id: I5189e966aecc57fe7c3e6c3f7f8e6b16917ee27f
2023-11-29 00:12:55 +01:00
Matthias Sohn 232813bfcd Suppress not-externalized string warnings
Change-Id: I2a0a588227d451cb175e17eef20ecb6fe9e9ef80
2023-11-29 00:09:52 +01:00
Matthias Sohn ff0ec5c612 Silence API error for new method BitmapIndex#addBitmapLookupListener
it has an empty default implementation.

Change-Id: I56b16c48992652a4ddaaf4c0435e08452c65749e
2023-11-29 00:04:18 +01:00
Matthias Sohn 5a717a7054 Update Orbit to orbit-aggregation/2023-12
Change-Id: Ifde28f60461e0a9d7b1278f8f178ceb2c4e1db7a
2023-11-28 23:53:29 +01:00
Matthias Sohn 5fdd58ae3c Merge branch 'master' into stable-6.8
* master:
  Adapt to type parameter added in commons-compress 1.25.0
  Improve footer parsing to allow multiline footers.
  Make the tests buildable by bazel test
  BitmapIndex: Add interface to track bitmaps found (or not)
  BitmapWalker: Remove BitmapWalkListener

Change-Id: Id2aeb0acd37bdd68a2f2c9f09f4d442fa40c9dd1
2023-11-27 23:34:02 +01:00
Matthias Sohn 42666cca34 Merge "Improve footer parsing to allow multiline footers." 2023-11-26 18:35:54 +00:00
Matthias Sohn e9433d338c Merge "Make the tests buildable by bazel test" 2023-11-25 19:54:02 +00:00
Matthias Sohn ef901e9aea Adapt to type parameter added in commons-compress 1.25.0
In 1.25.0 commons-compress added a generic type parameter to
ArchiveOutputStream to avoid unchecked/unconfirmed type casts in
subclasses.

Change-Id: Ib4c208fc1fb65f73ea57c5bf723fde71b0d6d9f7
2023-11-24 18:22:07 +00:00
Kamil Musin 340cc787a0 Improve footer parsing to allow multiline footers.
According to the https://git-scm.com/docs/git-interpret-trailers the
CGit supports multiline trailers. Subsequent lines of such multiline
trailers have to start with a whitespace.

We also rewrite the original parsing code to make it easier to work
with. The old code had pointers moving both backwards and forwards at
the same time. In the rewritten code we first find the start of the last
paragraph and then do all the parsing.

Since all the getters of the FooterLine return String, I've considered
rewriting the parsing code to operate on strings. However the original
code seems to be written with the idea, that the data is only lazily
copied in getters and no extra allocations should be performed during
original parsing (ex. during RevWalk). The changed code keeps to this
idea.

Bug: Google b/312440626
Change-Id: Ie1e3b17a4a5ab767b771c95f00c283ea6c300220
2023-11-24 15:39:02 +01:00
Kamil Musin 2a739ad2c1 Make the tests buildable by bazel test
All the errorprone checkers fail in many existing places of the
codebase, making it impossible to run bazel test. Downgrade all to
":WARN".

MergeToolTest is asserting a wrong error line, but the line seems
different between bazel and mvn test runs. Therefore we don't fix it and
simply run

```
bazel test -- //... -//org.eclipse.jgit.pgm.test:pgm
```

Change-Id: I44913ebc70dcc934cb69481cc3ff9ae0d8059707
2023-11-23 14:07:41 +01:00
Matthias Sohn 9a05ca42ba Prepare 6.8.0-SNAPSHOT builds
Change-Id: I89178175549541111cddb88da401899960c0ecac
2023-11-22 01:41:02 +01:00
Matthias Sohn 7bc697dfde JGit v6.8.0.202311212206-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I6a40cdef68538fa769f4525eb2ff1ed4a810f11c
2023-11-21 23:05:56 +01:00
Matthias Sohn 7720d252cd Merge branch 'master' into stable-6.8
* master:
  Update repository URLs in CONTRIBUTING.md
  Fix typo in FileUtils.isStaleFileHandle() javadoc
  Fix branch ref exist check
  gpg.bc: Supress errorprone InsecureCryptoUsage
  Adjust javadoc to pass errorprone checks
  Update org.apache.commons:commons-compress to 1.25.0
  Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD
  BitmapWalkListener: Use plain interface with noop instance
  BitmapWalkListener: Add method and rename for commits
  Update bouncycastle to 1.77
  PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream
  BitmapWalker: announce walked objects via listener interface
  Update jetty to 10.0.18
  SSH: bump org.apache.sshd to 2.11.0
  CommitGraphWriter: Remove unnecesary progress update call

Change-Id: I97574c4801ccafd4e808a1fcf6f8d079ff5709b3
2023-11-21 23:04:27 +01:00
Ivan Frade aab75dba7e BitmapIndex: Add interface to track bitmaps found (or not)
We want to know what objects had bitmaps in the walk of the
request. We can check their position in the history and evaluate our
bitmap selection algorithm.

Introduce a listener interface to the BitmapIndex to report which
getBitmap() calls returned a bitmap (or not) and a method to the
bitmap index to set the listener.

Change-Id: Iac8fcc1539ddd2dd450e8a1cf5a5b1089679c378
2023-11-21 11:19:01 -08:00
Ivan Frade c0d15c2abf BitmapWalker: Remove BitmapWalkListener
We can track bitmaps queries that found a bitmap directly in the
BitmapIndex.

Remove the listener.

Change-Id: I5ad518a58b681bf327fee3ae5c5f6e4449d3da1f
2023-11-21 11:18:59 -08:00
Matthias Sohn cd8322091e Update repository URLs in CONTRIBUTING.md
after the move to eclipse.gerrithub.io.

Change-Id: I8e7aac62c991b941def263d3d7585991f1355738
2023-11-20 22:05:27 +01:00
Matthias Sohn d1b0530fee Merge "Fix typo in FileUtils.isStaleFileHandle() javadoc" 2023-11-17 18:45:17 -05:00
Dariusz Luksza 823b6a45ff Fix typo in FileUtils.isStaleFileHandle() javadoc
Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com>
Change-Id: Iac431bbcb00f0a1fa36e2ba4af5fe33fcee69e04
2023-11-17 23:23:23 +00:00
florian.signoret e4a341db43 Fix branch ref exist check
When a tag with the same name as the branch exists, the branch creation
process should work too. We should detect that the branch already
exists, and allow to force create it when the force option is used.

Bug: 582538
Change-Id: I3b350d03be8edcde10e97b2318343240ca896cb0
2023-11-18 00:05:35 +01:00
Ivan Frade 52af8dbaff gpg.bc: Supress errorprone InsecureCryptoUsage
From errorprone doc: "Dynamically constructed transformation strings
are also flagged, as they may conceal an instance of ECB mode."

https://errorprone.info/bugpattern/InsecureCryptoUsage

Silence the message as a quick relief.

Change-Id: I348f0fff0e3b24ce1f11917e849b4095b186d1f0
2023-11-17 10:17:28 -08:00
Ivan Frade 5c173c632d Adjust javadoc to pass errorprone checks
bazel build //org.eclipse.jgit.test:all doesn't build due to
errorprone errors. This leds to disabling the checks and find the
errors later in the jenkins builder.

Fix javadoc errors reported by errorprone. This doesn't fix completely
the build but it is a step towards it.

Change-Id: Ic4ec93a2d71d4628bf3a05277c60157881156393
2023-11-17 10:17:28 -08:00
Matthias Sohn 6b4787a727 Merge "Update org.apache.commons:commons-compress to 1.25.0" 2023-11-17 02:34:54 -05:00
Matthias Sohn 9167ee57a3 Merge "Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD" 2023-11-16 19:41:46 -05:00
Ivan Frade 3ed190a788 Merge "BitmapWalkListener: Use plain interface with noop instance" 2023-11-16 19:22:16 -05:00
Matthias Sohn 705e3d686b Update org.apache.commons:commons-compress to 1.25.0
Change-Id: Ic9c6910853ad00075501aa3e03888fefbe634bf6
2023-11-17 01:13:57 +01:00
Matthias Sohn 2986d39ae8 Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD
Change-Id: I71f067199c63aa1407f543f6d40ef05b928e9f95
2023-11-17 01:13:01 +01:00
Matthias Sohn a58cd805dc Merge "Update bouncycastle to 1.77" 2023-11-16 19:06:15 -05:00
Ivan Frade e612c25228 BitmapWalkListener: Use plain interface with noop instance
In this new interface default methods are useful only to instantiate
noop instances. We rather reuse the same noop instance and save the
"default" to add backward compatible methods to existing interfaces.

Make the methods regular interface methods and provide a noop
instance.

Change-Id: Ie84ff17c8e9f16837245751739ee8c99463e76ee
2023-11-16 16:05:14 -08:00
Ivan Frade 4d82d0aa1f BitmapWalkListener: Add method and rename for commits
During the walk, the commit can be either
1. already in the walk bitmap
2. unvisited so far with bitmap in the bitmap index
3. unvisited so far without bitmap in the bitmap index

Expose these three states in the interface. This makes the interface
easier to explain: it reports the commits found during the walk.

As it is all about commits, rename the methods to onCommit***.

Change-Id: I661f303eb22d3e735b0e439f16df7ace612376d9
2023-11-16 14:37:24 -08:00
Ivan Frade 4b5e992834 Merge "CommitGraphWriter: Remove unnecesary progress update call" 2023-11-16 14:53:13 -05:00
Matthias Sohn 8af2f785e3 Update bouncycastle to 1.77
Change-Id: I2dc011247ace2eeea8c46587cae55a39be086f36
2023-11-16 14:16:08 -05:00
Jonathan Nieder decd86992a Merge "PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream" 2023-11-16 05:26:55 -05:00
Nitzan Gur-Furman 754a1b4922 PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream
The documentation for TemporaryBuffer::length says:
"The length is only accurate after {@link #close()} has been invoked".
However, we need to have the stream open while accessing the length.

This prevents patches on large files to be applied correctly, as the
result get trimmed.

Bug: Google b/309500446
Change-Id: Ic1540f6d0044088f3b46f1fad5f6a28ec254b711
2023-11-16 09:47:19 +01:00
Ivan Frade 9c4100b977 Merge "BitmapWalker: announce walked objects via listener interface" 2023-11-15 18:33:30 -05:00
Ivan Frade d3f711ca1d BitmapWalker: announce walked objects via listener interface
We want to know what objects had a bitmap in the walk, to see where do
they sit in the commit history and evaluate our bitmap selection
algorithm.

Add a listener interface to the bitmap walker announcing the objects
walked and whether they had bitmap.

Change-Id: I956fe2ad927a500710d2cbe78ecd4d26f178c266
2023-11-15 15:04:31 -08:00
Matthias Sohn df6f0bb655 Merge branch 'stable-6.8'
* stable-6.8:
  Prepare 6.8.0-SNAPSHOT builds
  JGit v6.8.0.202311151710-m2

Change-Id: I26603b974f0ccd5a6da3801988d925d73a692c0e
2023-11-15 23:43:53 +01:00
Matthias Sohn d9568eda92 Prepare 6.8.0-SNAPSHOT builds
Change-Id: Id11a260db84aea6743f2e6edec8b8010693aab42
2023-11-15 23:42:56 +01:00
Matthias Sohn 8db605620b Update jetty to 10.0.18
Change-Id: I34c9f7c062400bb69849812d57390dd2e7b04cac
2023-11-15 22:20:29 +01:00
Thomas Wolf ac0a995975 SSH: bump org.apache.sshd to 2.11.0
Update maven build, bazel build, and target platform.

Also remove a file in a ./bin directory that got committed by mistake
in commit f5f4bf0ad.

Change-Id: Ia653c71643f8fad290874d723dacdafbef25c13f
Signed-off-by: Thomas Wolf <twolf@apache.org>
2023-11-15 21:38:23 +01:00