]> source.dussan.org Git - jgit.git/log
jgit.git
3 years agoGitServlet: allow to override default error handlers 43/184843/3
Antonio Barone [Wed, 1 Sep 2021 10:04:07 +0000 (12:04 +0200)]
GitServlet: allow to override default error handlers

GitServlet delegates repository access over HTTP to the GitFilter
servlet.

GitServlet, in turn, can be extended by jgit consumers to provide custom
logic when handling such operations.

This is the case, for example, with Gerrit Code Review, which provides
custom behavior with a GitOverHttpServlet [1].

Among possible customizations, the ability of specifying a custom error
handler for UploadPack and ReceivePack was already introduced in
GitFilter by Idd3b87d6b and I9c708aa5a2, respectively.

However the `setUploadPackErrorHandler` and `setReceivePackErrorHandler`
methods were never added to the GitServlet.

Expose the `setUploadPackErrorHandler` and `setReceivePackErrorHandler`
methods to the GitServlet, so that consumers of the jgit library might
specify custom error handlers.

[1] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.2/java/com/google/gerrit/httpd/GitOverHttpServlet.java#95

Change-Id: I712d485ff68b662b48c71ef75650c5a155950d23

3 years agoMerge branch 'stable-5.8' into stable-5.9 81/183481/1
Thomas Wolf [Thu, 29 Jul 2021 11:09:52 +0000 (13:09 +0200)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  [test] Create keystore with the keytool of the running JDK
  ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: If09cbb877c674f15261715cecef7a2393bf66fa3
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.7' into stable-5.8 80/183480/1
Thomas Wolf [Thu, 29 Jul 2021 11:09:13 +0000 (13:09 +0200)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  [test] Create keystore with the keytool of the running JDK
  ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: I32010c6bf45d5138e17143d6c284ac56434eade1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.6' into stable-5.7 79/183479/1
Thomas Wolf [Thu, 29 Jul 2021 11:08:01 +0000 (13:08 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  [test] Create keystore with the keytool of the running JDK
  ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: I1f6b4fc26f6ee6f22cc0aacd032c1e73ba246dbc
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.5' into stable-5.6 78/183478/1
Thomas Wolf [Thu, 29 Jul 2021 11:06:56 +0000 (13:06 +0200)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  [test] Create keystore with the keytool of the running JDK

Change-Id: Icb0bb6dc4ad05b1f3eb562547893f2e0aedf8775
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.4' into stable-5.5 77/183477/1
Thomas Wolf [Thu, 29 Jul 2021 11:05:59 +0000 (13:05 +0200)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  [test] Create keystore with the keytool of the running JDK

Change-Id: I5ff3dc1c771aeb33af39eb68f166c7282b478cf8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.3' into stable-5.4 76/183476/1
Thomas Wolf [Thu, 29 Jul 2021 11:05:20 +0000 (13:05 +0200)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  [test] Create keystore with the keytool of the running JDK

Change-Id: If92372b7bfbfb9445fcb934c48dc1cd6610e061b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.2' into stable-5.3 75/183475/1
Thomas Wolf [Thu, 29 Jul 2021 11:03:56 +0000 (13:03 +0200)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  [test] Create keystore with the keytool of the running JDK

Change-Id: I981de862c614986a7b443fed1cce7b895b758682
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoMerge branch 'stable-5.1' into stable-5.2 74/183474/1
Thomas Wolf [Thu, 29 Jul 2021 11:02:16 +0000 (13:02 +0200)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  [test] Create keystore with the keytool of the running JDK

Change-Id: Ic56f4f23c37432377be88e07d06c5ad75591d84f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years ago[test] Create keystore with the keytool of the running JDK 71/183471/1
Thomas Wolf [Sun, 25 Jul 2021 13:44:35 +0000 (15:44 +0200)]
[test] Create keystore with the keytool of the running JDK

Call keytool with the absolute path of "java.home". Otherwise a keytool
for a different, maybe even newer Java version might be picked up, and
then the keystore may not be readable by the JVM used to run the tests.

(cherry picked from commit 2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe)

Change-Id: Iea77024947a34267f008847d81312fe0abadc615
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoRetry loose object read upon "Stale file handle" exception 95/181295/12
Antonio Barone [Wed, 2 Jun 2021 15:13:17 +0000 (18:13 +0300)]
Retry loose object read upon "Stale file handle" exception

When reading loose objects over NFS it is possible that the OS syscall
would fail with ESTALE errors: This happens when the open file
descriptor no longer refers to a valid file.

Notoriously it is possible to hit this scenario when git data is shared
among multiple clients, for example by multiple gerrit instances in HA.

If one of the two clients performs a GC operation that would cause the
packing and then the pruning of loose objects, the other client might
still hold a reference to those objects, which would cause an exception
to bubble up the stack.

The Linux NFS FAQ[1] (at point A.10), suggests that the proper way to
handle such ESTALE scenarios is to:

"[...] close the file or directory where the error occurred, and reopen
it so the NFS client can resolve the pathname again and retrieve the new
file handle."

In case of a stale file handle exception, we now attempt to read the
loose object again (up to 5 times), until we either succeed or encounter
a FileNotFoundException, in which case the search can continue to
Packfiles and alternates.

The limit of 5 provides an arbitrary upper bounds that is consistent to
the one chosen when handling stale file handles for packed-refs
files (see [2] for context).

[1] http://nfs.sourceforge.net/
[2] https://git.eclipse.org/r/c/jgit/jgit/+/54350

Bug: 573791
Change-Id: I9950002f772bbd8afeb9c6108391923be9d0ef51

3 years agoIgnore missing javadoc in test bundles 25/182425/1
Matthias Sohn [Thu, 24 Jun 2021 21:13:51 +0000 (23:13 +0200)]
Ignore missing javadoc in test bundles

Change-Id: I83ed20823dc6b22ff48c2a554acb2f7d3b6067b7

3 years agoReachabilityCheckerTestCase: fix reachable from self test case 55/182055/1
Han-Wen Nienhuys [Wed, 16 Jun 2021 15:41:24 +0000 (17:41 +0200)]
ReachabilityCheckerTestCase: fix reachable from self test case

Change-Id: I8f94a0a0ff401f1691b3757002756b4e83dd8640
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
3 years agoMerge branch 'stable-5.8' into stable-5.9 81/181881/1
Matthias Sohn [Sun, 13 Jun 2021 21:55:03 +0000 (23:55 +0200)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I9abf7dd8b8e5eb3199fd6b43a4653c4e4cf4bf1b

3 years agoMerge branch 'stable-5.7' into stable-5.8 80/181880/1
Matthias Sohn [Sun, 13 Jun 2021 21:54:06 +0000 (23:54 +0200)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I1ee0d01c14fb7dca151b4e7ae1b989da5a3a01e3

3 years agoMerge branch 'stable-5.6' into stable-5.7 79/181879/1
Matthias Sohn [Sun, 13 Jun 2021 21:52:46 +0000 (23:52 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I4570cce185877cb4c50eee519a1cf9467a766dea

3 years agoMerge branch 'stable-5.5' into stable-5.6 79/181479/5
Matthias Sohn [Sun, 6 Jun 2021 08:45:57 +0000 (10:45 +0200)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in
    memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I504483a4dc979c5e7af18bad45dc18675e32afd2

3 years agoMerge branch 'stable-5.4' into stable-5.5 78/181478/1
Matthias Sohn [Sat, 5 Jun 2021 20:49:56 +0000 (22:49 +0200)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: If5232b68d3e25df7b71e417cbcbb39476e925f22

3 years agoMerge branch 'stable-5.3' into stable-5.4 77/181477/1
Matthias Sohn [Sat, 5 Jun 2021 20:49:07 +0000 (22:49 +0200)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I1338fc79a7be6b77fb28df511dd7504fb19b6d1a

3 years agoMerge branch 'stable-5.2' into stable-5.3 76/181476/1
Matthias Sohn [Sat, 5 Jun 2021 20:48:01 +0000 (22:48 +0200)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: I7838f7d237a3598bf55995426d7ba1de146cb6ad

3 years agoMerge branch 'stable-5.1' into stable-5.2 75/181475/1
Matthias Sohn [Sat, 5 Jun 2021 20:19:47 +0000 (22:19 +0200)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.17-SNAPSHOT builds
  JGit v5.1.16.202106041830-r
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()
  Update bazlets and bazel version

Change-Id: If1b5a2b380cf155e66bf5d5c6d216f86c919bb37

3 years agoPrepare 5.1.17-SNAPSHOT builds 72/181472/1
Matthias Sohn [Fri, 4 Jun 2021 22:45:08 +0000 (00:45 +0200)]
Prepare 5.1.17-SNAPSHOT builds

Change-Id: I20c69728465f956a5744a75eb548ef18962286dd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.1.16.202106041830-r 71/181471/1 v5.1.16.202106041830-r
Matthias Sohn [Fri, 4 Jun 2021 22:31:03 +0000 (00:31 +0200)]
JGit v5.1.16.202106041830-r

Change-Id: I526ed2a08553bc0b2678aaefaff9e0c6529baefc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge changes I853ac6c7,I01878116,Ie994fc18 into stable-5.1
Matthias Sohn [Fri, 4 Jun 2021 22:21:31 +0000 (18:21 -0400)]
Merge changes I853ac6c7,I01878116,Ie994fc18 into stable-5.1

* changes:
  BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
  BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired
  Optimize RefDirectory.isNameConflicting()

3 years agoBatchRefUpdate: Skip saving conflicting ref names and prefixes in memory 97/180697/4
Kaushik Lingarkar [Wed, 12 May 2021 23:12:27 +0000 (16:12 -0700)]
BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory

Rather than getting all ref names and prefixes and saving them
in memory to perform the check for conflicting names, rely on
RefDirectory.isNameConflicting as it is no longer an expensive
call after it was optimized in Ie994fc.

The old optimization to save ref names and prefixes in memory
was targeted towards making clones faster. With this change,
the clone performance is unaffected when tests were done with
repos containing many(~500k) refs.

Here are few recorded elapsed times for creating 10 branches
using BatchRefUpdate on NFS based repositories with varying
loose refs count. As seen here, this change helps improve the
BatchRefUpdate performance from O(n^2) to O(1).

loose_refs_count  with_change  without_change
50                241 ms        310 ms
300               263 ms        1502 ms
1k                181 ms        4241 ms
2k                204 ms        6440 ms
9k                158 ms        25930 ms
20k               154 ms        60443 ms
50k               171 ms        135199 ms
110k              157 ms        329450 ms
160k              209 ms        396328 ms

This update improves the Gerrit notedb migration performance
as it uses BatchRefUpdate to write change meta refs similar to
the test performed above.

Change-Id: I853ac6c7feb4b39c3156c01876b38cbd182accfe
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
3 years agoBatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired 96/180696/7
Kaushik Lingarkar [Fri, 14 May 2021 21:24:41 +0000 (14:24 -0700)]
BatchRefUpdateTest: Accurately assert RefsChangedEvent(s) fired

Update tests to record the number of events fired post-setup and only
assert for events fired during BatchRefUpdate.execute. For tests which
use writeLooseRef to setup refs, create new tests which assert the
number of RefsChangedEvent(s) rather than updating the existing ones
to call RefDirectory.exactRef as it changes the code path.

Change-Id: I0187811628d179d9c7e874c9bb8a7ddb44dd9df4
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
3 years agoOptimize RefDirectory.isNameConflicting() 59/180559/4
Kaushik Lingarkar [Wed, 12 May 2021 21:57:49 +0000 (14:57 -0700)]
Optimize RefDirectory.isNameConflicting()

Avoid having to scan over ALL loose refs to determine if the
name is nested within or is a container of an existing reference.
This can get really expensive if there are too many loose refs.
Instead use exactRef and getRefsByPrefix which scan based on a
prefix.

With a simple shell script(like below) using jgit client to create
1k refs in a new repository on NFS, this change brings down the time
from 12mins to 7mins.

for ref in $(seq 1 1000); do
    jgit branch "$ref"
done

Here are few recorded elapsed times to create a new branch on NFS
based repositories with varying loose refs count. As we see here,
this change improves the name conflicting check from O(n^2) to O(1).

loose_refs_count  with_change  without_change
50                44 ms        164 ms
300               45 ms        1193 ms
1k                38 ms        2610 ms
2k                44 ms        6003 ms
9k                46 ms        27860 ms
20k               45 ms        48591 ms
50k               51 ms        135471 ms
110k              43 ms        294252 ms
160k              52 ms        430976 ms

Change-Id: Ie994fc184b8f82811bfb37b111eb9733dbe3e6e0
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
3 years agoUpdate bazlets and bazel version 22/180622/1
Matthias Sohn [Thu, 16 Jan 2020 12:07:20 +0000 (13:07 +0100)]
Update bazlets and bazel version

- bazlets need to be updated to react on Maven central no longer
supporting http protocol but only https
- update bazel to 2.0

Change-Id: I07f5f050f3b1db2014a5198a28b6bbf893434814
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
(cherry picked from commit d74daad1e064da9614c5ca2c0138c8046cfb0829)

3 years agoMerge branch 'stable-5.8' into stable-5.9 97/180497/2
Matthias Sohn [Tue, 11 May 2021 22:03:00 +0000 (00:03 +0200)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  Remove texts which were added by mistake in 00386272
  Fix formatting which was broken in 00386272

Change-Id: I9ca7a0237f87d1d4bcaba81e709eaa67902f27e5

3 years agoMerge branch 'stable-5.7' into stable-5.8 96/180496/1
Matthias Sohn [Tue, 11 May 2021 21:34:30 +0000 (23:34 +0200)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Remove texts which were added by mistake in 00386272
  Fix formatting which was broken in 00386272

Change-Id: I7ed3f47cb46e6c1bf483702c8925a24e88658e47

3 years agoMerge branch 'stable-5.6' into stable-5.7 95/180495/1
Matthias Sohn [Tue, 11 May 2021 21:32:22 +0000 (23:32 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Remove texts which were added by mistake in 00386272
  Fix formatting which was broken in 00386272

Change-Id: I45d444b360485564744bf3dfad2c2f5a5e7fcdf6

3 years agoRemove texts which were added by mistake in 00386272 87/180487/1
Matthias Sohn [Tue, 11 May 2021 16:37:37 +0000 (18:37 +0200)]
Remove texts which were added by mistake in 00386272

Change-Id: Iaed25dac0bc9af8f3fda6138a5f9fe553bff5d39
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoFix formatting which was broken in 00386272 86/180486/1
Matthias Sohn [Tue, 11 May 2021 16:36:05 +0000 (18:36 +0200)]
Fix formatting which was broken in 00386272

Change-Id: I10a3e2b117e790f64386a8e9e7663db8e59230d9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.8' into stable-5.9 36/180436/1
Matthias Sohn [Mon, 10 May 2021 22:55:54 +0000 (00:55 +0200)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  LockFile: create OutputStream only when needed
  Remove ReftableNumbersNotIncreasingException

Change-Id: I3274c97cf560398c3c4c27d6759500452f315db0

3 years agoMerge branch 'stable-5.7' into stable-5.8 35/180435/1
Matthias Sohn [Mon, 10 May 2021 22:51:21 +0000 (00:51 +0200)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  LockFile: create OutputStream only when needed
  Remove ReftableNumbersNotIncreasingException

Change-Id: Ib3f280e0741f87a0ff615d857a5ea39b35527e74

3 years agoMerge branch 'stable-5.6' into stable-5.7 34/180434/1
Matthias Sohn [Mon, 10 May 2021 22:19:10 +0000 (00:19 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  LockFile: create OutputStream only when needed

Change-Id: I7c0e37d2cee0923662a7e39df5a802a84c017e4f

3 years agoLockFile: create OutputStream only when needed 32/180432/1
Thomas Wolf [Tue, 4 May 2021 21:48:56 +0000 (23:48 +0200)]
LockFile: create OutputStream only when needed

Don't create the stream eagerly in lock(); that may cause JGit to
exceed OS or JVM limits on open file descriptors if many locks need
to be created, for instance when creating many refs. Instead create
the output stream only when one really needs to write something.

Bug: 573328
Change-Id: If9441ed40494d46f594a896d34a5c4f56f91ebf4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
3 years agoRemove ReftableNumbersNotIncreasingException 10/159910/2
Han-Wen Nienhuys [Mon, 1 Mar 2021 11:17:54 +0000 (12:17 +0100)]
Remove ReftableNumbersNotIncreasingException

In a distributed setting, one can have multiple datacenters use
reftables for serving, while the ground truth for the Ref database is
administered centrally. In this setting, replication delays combined
with compaction can cause update-index ranges to overlap.

Such a setting is used at Google, and the JGit code already handles
this correctly (modulo a bugfix that applied in change I8f8215b99a).

Remove the restriction that was applied at FileReftableDatabase.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I6f9ed0fbd7fbc5220083ab808b22a909215f13a9

3 years agoFix stamping to produce stable file timestamps 23/173523/3
David Ostrovsky [Sat, 5 Dec 2020 13:48:23 +0000 (14:48 +0100)]
Fix stamping to produce stable file timestamps

Change-Id: I628ab5feb4a70f81ec832f1b81d1ad3a9caca615

3 years agoMerge branch 'stable-5.8' into stable-5.9 34/173234/1
Matthias Sohn [Wed, 2 Dec 2020 14:31:00 +0000 (15:31 +0100)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: I08caea979ac4c1298b453e6e5558bccb86fb0181
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.7' into stable-5.8 33/173233/1
Matthias Sohn [Wed, 2 Dec 2020 14:28:33 +0000 (15:28 +0100)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: I638ee6409f25ac8bcb2e365b1c37939b520b289f

3 years agoMerge branch 'stable-5.6' into stable-5.7 32/173232/1
Matthias Sohn [Wed, 2 Dec 2020 14:25:44 +0000 (15:25 +0100)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: If5f001c414e677bb2bac59714421f0191b23ea1f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.5' into stable-5.6 31/173231/1
Matthias Sohn [Wed, 2 Dec 2020 14:21:10 +0000 (15:21 +0100)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: I986029816ef66fbfae1a59bd97179392320a485c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.4' into stable-5.5 30/173230/1
Matthias Sohn [Wed, 2 Dec 2020 14:15:58 +0000 (15:15 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: Iede8686198332d6271771bef6eb00c25f1103979
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.3' into stable-5.4 27/173227/1
Matthias Sohn [Wed, 2 Dec 2020 13:26:26 +0000 (14:26 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: I319b54ceffe095add60420c6ae83eac0ba9c14b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.3.10-SNAPSHOT builds 25/173225/1
Matthias Sohn [Wed, 2 Dec 2020 12:09:57 +0000 (13:09 +0100)]
Prepare 5.3.10-SNAPSHOT builds

Change-Id: I6f131ad04574bd0d569ae6a59c29ea987be0efb2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.3.9.202012012026-r 89/173189/1 v5.3.9.202012012026-r
Matthias Sohn [Wed, 2 Dec 2020 01:27:44 +0000 (02:27 +0100)]
JGit v5.3.9.202012012026-r

Change-Id: I75e03ef8630d7a369e97be0f797253b968575354
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.2' into stable-5.3 88/173188/1
Matthias Sohn [Wed, 2 Dec 2020 01:18:51 +0000 (02:18 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: If1d8034b5e0cbc004a11a31b228cb5732efb390d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.1' into stable-5.2 87/173187/1
Matthias Sohn [Wed, 2 Dec 2020 01:17:27 +0000 (02:17 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: Id83e29e567646a3945a5b817860ea8f7c3e6e5cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.1.16-SNAPSHOT builds 86/173186/1
Matthias Sohn [Wed, 2 Dec 2020 01:02:48 +0000 (02:02 +0100)]
Prepare 5.1.16-SNAPSHOT builds

Change-Id: I50e59e1e73a92fa4fe366398fb8141f5e2e289c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.1.15.202012011955-r 85/173185/1 v5.1.15.202012011955-r
Matthias Sohn [Wed, 2 Dec 2020 00:53:39 +0000 (01:53 +0100)]
JGit v5.1.15.202012011955-r

Change-Id: Icb4f04a40ab366cbacbb3fdf0db1748f27277fda
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoFix PackInvalidException when fetch and repack run concurrently 40/173040/4
Petr Hrebejk [Mon, 30 Nov 2020 19:19:53 +0000 (20:19 +0100)]
Fix PackInvalidException when fetch and repack run concurrently

We are running several servers with jGit. We need to run repack from
time to time to keep the repos performant. I.e. after push we test how
many small packs are in the repo and when a threshold is reached we run
the repack.

After upgrading jGit version we've found that if someone does the clone
at the time repack is running the clone sometimes (not always) fails
because the repack removes .pack file used by the clone. Server
exception and client error attached.

I've tracked down the cause and it seems to be introduced between jGit
5.2 (which we upgraded from) and 5.3 and being caused by this commit:
Move throw of PackInvalidException outside the catch -
https://github.com/eclipse/jgit/commit/afef866a44cd65fef292c174cad445b3fb526400

The problem is that when the throw was inside of the try block the last
catch block catched the exception and called openFailed(false) method.
It is true that it called it with invalidate = false, which is wrong.
The real problem though is that with the throw outside of the try block
the openFail is not called at all and the fields activeWindows and
activeCopyRawData are not set to 0. Which affects the later called tests
like: if (++activeCopyRawData == 1 && activeWindows == 0).

The fix for this is relatively simple keeping the throw outside of the
try block and still having the invalid field set to true. I did
exhaustive testing of the change running concurrent clones and pushes
indefinitely and with the patch applied it never fails while without the
patch it takes relatively short to get the error.

See: https://www.eclipse.org/lists/jgit-dev/msg04014.html

Bug: 569349
Change-Id: I9dbf8801c8d3131955ad7124f42b62095d96da54
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoAdd constants for parsing git wire protocol version 79/172979/3
David Ostrovsky [Sun, 29 Nov 2020 12:06:00 +0000 (13:06 +0100)]
Add constants for parsing git wire protocol version

This would allow other JGit users to access and reuse the constants.

Change-Id: I1608802f45586af5f8582afa592e26679e9cebe3
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.8' into stable-5.9 16/172916/1
Matthias Sohn [Fri, 27 Nov 2020 08:38:30 +0000 (09:38 +0100)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  PacketLineIn: ensure that END != DELIM
  Update API warning filters
  Remove unused imports

Change-Id: I70b399eb3df02aa2fb112e86e844cf5a0daa5515
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.7' into stable-5.8 15/172915/1
Matthias Sohn [Fri, 27 Nov 2020 08:07:00 +0000 (09:07 +0100)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I9b94938f5c09bd726e8e368c98c56da8280fd0b2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.6' into stable-5.7 13/172913/1
Matthias Sohn [Fri, 27 Nov 2020 02:05:22 +0000 (03:05 +0100)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features

Change-Id: Iad4da36d82e8a4dad965c0de52910a4ce4e2d2da
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.5' into stable-5.6 12/172912/1
Matthias Sohn [Fri, 27 Nov 2020 02:04:00 +0000 (03:04 +0100)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features

Change-Id: Ifb6ebe56577719c0dfc6425557130b91e510d5c7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.4' into stable-5.5 11/172911/1
Matthias Sohn [Fri, 27 Nov 2020 01:37:17 +0000 (02:37 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features

Change-Id: I25eff574e4c1cd0aef7cf2c685aade2f87fb0409
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoRemove unused imports 05/172905/1
Matthias Sohn [Fri, 27 Nov 2020 01:27:25 +0000 (02:27 +0100)]
Remove unused imports

Change-Id: Id78f4fd7d11a8908f41160a2ab9f3d81b7f771da
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoSilence API warnings 04/172904/1
Matthias Sohn [Fri, 27 Nov 2020 01:26:23 +0000 (02:26 +0100)]
Silence API warnings

Change-Id: I5de476935e79f8f0beefc27885cbc3ffe31c0aed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoRemove erraneously merged source features 03/172903/1
Matthias Sohn [Fri, 27 Nov 2020 01:20:00 +0000 (02:20 +0100)]
Remove erraneously merged source features

In 5.4 source features were combined into a single feature.

Change-Id: I4055ec805bb036d0f445c8b9b0bb670495a32cc0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.6' into stable-5.7 98/172898/1
Matthias Sohn [Fri, 27 Nov 2020 00:02:49 +0000 (01:02 +0100)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: Ie24d381f295cccfb99068c7ed5817179da29c1db
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.5' into stable-5.6 97/172897/1
Matthias Sohn [Fri, 27 Nov 2020 00:01:17 +0000 (01:01 +0100)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I00c8ddad0059a20a978743dfb7ad1b513dc7fef6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.4' into stable-5.5 96/172896/1
Matthias Sohn [Thu, 26 Nov 2020 23:40:00 +0000 (00:40 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: Icc34f809a3bb019d8d640b9bdb71363e617942e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.3' into stable-5.4 95/172895/1
Matthias Sohn [Thu, 26 Nov 2020 23:29:39 +0000 (00:29 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I82576ad0f61cf3ff11b54691b32666c61401ad9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.3.9-SNAPSHOT builds 94/172894/1
Matthias Sohn [Thu, 26 Nov 2020 15:30:32 +0000 (16:30 +0100)]
Prepare 5.3.9-SNAPSHOT builds

Change-Id: I69f181453c79cef2b4f43fac38d9836917cdc973
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.3.8.202011260953-r 81/172881/1 v5.3.8.202011260953-r
Matthias Sohn [Thu, 26 Nov 2020 14:52:53 +0000 (15:52 +0100)]
JGit v5.3.8.202011260953-r

Change-Id: I7b128942ef224335f415f867c2d9d5da7498ed8b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.2' into stable-5.3 80/172880/1
Matthias Sohn [Thu, 26 Nov 2020 14:37:19 +0000 (15:37 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: Id9386846a202b5ae98dd602744963f8897ddaa8c

3 years agoMerge branch 'stable-5.1' into stable-5.2 74/172874/1
Matthias Sohn [Thu, 26 Nov 2020 14:34:08 +0000 (15:34 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I91cfe2820c40d2d773cbf018cc2a6c36b062801e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.1.15-SNAPSHOT builds 73/172873/1
Matthias Sohn [Thu, 26 Nov 2020 14:02:01 +0000 (15:02 +0100)]
Prepare 5.1.15-SNAPSHOT builds

Change-Id: I70246b66c76e865aef4e3adada3a507750ca7c63
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.1.14.202011251942-r 62/172862/1 v5.1.14.202011251942-r
Matthias Sohn [Thu, 26 Nov 2020 00:42:17 +0000 (01:42 +0100)]
JGit v5.1.14.202011251942-r

Change-Id: Ibe124988be39feaa029c3770777126dd87b18abc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoGC#deleteOrphans: log warning for deleted orphaned files 61/172861/4
Matthias Sohn [Wed, 25 Nov 2020 23:58:03 +0000 (00:58 +0100)]
GC#deleteOrphans: log warning for deleted orphaned files

Change-Id: Ie245bf5c8c924dfb1f0f40b8bcdcb1e6f5815526
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoGC#deleteOrphans: handle failure to list files in pack directory 60/172860/3
Matthias Sohn [Wed, 25 Nov 2020 23:24:56 +0000 (00:24 +0100)]
GC#deleteOrphans: handle failure to list files in pack directory

- log an error
- either there is no list or it is incomplete hence return immediately

Change-Id: Ieee5378ca06304056b9ccc30c1acd5f52360052d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoEnsure that GC#deleteOrphans respects pack lock 29/172829/8
Matthias Sohn [Wed, 25 Nov 2020 16:00:09 +0000 (17:00 +0100)]
Ensure that GC#deleteOrphans respects pack lock

If pack or index files are guarded by a pack lock (.keep file)
deleteOrphans() should not touch the respective files protected by the
lock file. Otherwise it may interfere with PackInserter concurrently
inserting a new pack file and its index.

The problem was caused by the following race.

All mentioned files are located in  "objects/pack/".
File endings relevant in "pack" dir:
  .pack
  .keep
  .idx
  .bitmap

When ReceivePack receives a pack file it executes the following steps:

ReceivePack.service():
  receivePackAndCheckConnectivity():
    receivePack():
      receive the pack
      parse the pack, returns packLock (.keep file)
      PackInserter.flush():
        write tmpPck file:  "insert_<random>.pack"
        write tmpIdx file:  "insert_<random>.idx"
        real pack name: "pack-<SHA1>.pack"
        real index name: "pack-<SHA1>.idx"
        atomic rename tmpPack to realPack
        atomic rename tmpIdx to tmpIdx
  execute commands
  unlock pack by removing .keep file
  trigger auto gc if enabled

When PackInserter.flush() renames the temporary pack to the final
"pack-xxx.pack" file  the temporary pack index file "insert_xxx.idx"
has no matching .pack file with the same base name for a short interval.
If deleteOrphans() ran during that interval it deduced the pack index
file was orphaned. Subsequently the missing pack index caused
MissingObjectExceptions since objects contained in the pack couldn't be
looked up anymore.

Bug: https://bugs.chromium.org/p/gerrit/issues/detail?id=13544
Change-Id: I559c81e4b1d7c487f92a751bd78b987d32c98719
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPacketLineIn: ensure that END != DELIM 01/172601/1
Thomas Wolf [Thu, 19 Nov 2020 12:23:05 +0000 (13:23 +0100)]
PacketLineIn: ensure that END != DELIM

Just allocate the two string objects directly. The previously used
new StringBuilder(0).toString() returns the same object for both END
and DELIM when run on Java 15, which breaks the wire protocol since
then END and DELIM cannot be distinguished anymore.

Bug: 568950
Change-Id: I9d54d7bf484948c24b51a094256bd9d38b085f35
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
(cherry picked from commit 7da0f0a8f37e35e9c3108588f1e6f7a7381d8f77)

3 years agoPacketLineIn: ensure that END != DELIM 35/172535/1
Thomas Wolf [Thu, 19 Nov 2020 12:23:05 +0000 (13:23 +0100)]
PacketLineIn: ensure that END != DELIM

Just allocate the two string objects directly. The previously used
new StringBuilder(0).toString() returns the same object for both END
and DELIM when run on Java 15, which breaks the wire protocol since
then END and DELIM cannot be distinguished anymore.

Bug: 568950
Change-Id: I9d54d7bf484948c24b51a094256bd9d38b085f35
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
(cherry picked from commit 7da0f0a8f37e35e9c3108588f1e6f7a7381d8f77)

4 years agoPrepare 5.9.1-SNAPSHOT builds 20/169020/1
Matthias Sohn [Tue, 8 Sep 2020 15:45:20 +0000 (17:45 +0200)]
Prepare 5.9.1-SNAPSHOT builds

Change-Id: I9006e7961111982943ffef496d15bd525959b3e4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.9.0.202009080501-r 99/168999/1 v5.9.0.202009080501-r
Matthias Sohn [Tue, 8 Sep 2020 11:01:43 +0000 (13:01 +0200)]
JGit v5.9.0.202009080501-r

Change-Id: Ic98ae61b3f327ef72256fd9b2e28510e3a481de7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years ago[releng] Enable japicmp for the fragments added in 5.8.0 68/168968/1
Thomas Wolf [Mon, 7 Sep 2020 21:42:51 +0000 (23:42 +0200)]
[releng] Enable japicmp for the fragments added in 5.8.0

Uncomment the japicmp configurations in the pom.xmls of the fragments
org.eclipse.jgit.gpg.bc and org.eclipse.jgit.ssh.jsch.

Change-Id: I7c884be014cb48387f97a300043b04aeb712fbba
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoGitlinkMergeTest: fix boxing warnings 64/168864/1
Matthias Sohn [Sat, 5 Sep 2020 21:28:06 +0000 (23:28 +0200)]
GitlinkMergeTest: fix boxing warnings

Change-Id: I4bdf1ab3e7d7e9d96318e2b16b792aa98ebd2ecd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove unused API problem filters 63/168863/1
Matthias Sohn [Sat, 5 Sep 2020 21:25:58 +0000 (23:25 +0200)]
Remove unused API problem filters

Change-Id: Ice154340e3377e89dc51d40587c8a4c5caec2bcf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd missing since tag on BundleWriter#addObjectsAsIs 62/168862/1
Matthias Sohn [Sat, 5 Sep 2020 21:25:02 +0000 (23:25 +0200)]
Add missing since tag on BundleWriter#addObjectsAsIs

Change-Id: Ia07c0ede31e280831869db77b70b43874d8ba3ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'master' into stable-5.9 61/168861/1
Matthias Sohn [Sat, 5 Sep 2020 20:51:02 +0000 (22:51 +0200)]
Merge branch 'master' into stable-5.9

* master:
  SshdSession: close channel gracefully
  jgit: Add DfsBundleWriter
  Prepare 5.10.0-SNAPSHOT builds
  ResolveMerger: do not content-merge gitlinks on del/mod conflicts
  ResolveMerger: Adding test cases for GITLINK deletion
  ResolveMerger: choose OURS on gitlink when ignoreConflicts
  ResolveMerger: improving content merge readability
  ResolveMerger: extracting createGitLinksMergeResult method
  ResolveMerger: Adding test cases for GITLINK merge

Back out the version change to 5.10.0-SNAPSHOT which was done on master
already.

Change-Id: I1a6b1f0b8f5773be47823d74f593d13b16a601d5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoSshdSession: close channel gracefully 37/168537/2
Thomas Wolf [Mon, 31 Aug 2020 19:22:26 +0000 (21:22 +0200)]
SshdSession: close channel gracefully

Close the channel gracefully to give the server a chance to clean up
properly on its side.

Bug: 565854
Change-Id: Iedda5af3b97c8321f08f7ce854274cbb30e401de
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoGPG: include signer's user ID in the signature 78/165078/2
Thomas Wolf [Wed, 17 Jun 2020 16:43:32 +0000 (18:43 +0200)]
GPG: include signer's user ID in the signature

Signing a commit with command line git and gpg 2.2.20 includes the
e-mail part of the key's user ID as a "Signer's User ID" subpacket
on the signature.

Implement this for signing via Bouncy Castle.

Bug: 564386
Change-Id: I68906b895349359596cf3451d65f2840c60df856
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge branch 'stable-5.9' 40/168840/1
Marco Miller [Fri, 4 Sep 2020 16:06:49 +0000 (12:06 -0400)]
Merge branch 'stable-5.9'

* stable-5.9:
  Bump Bazel version to 3.5.0

Change-Id: Ic96a2918c34696d31af5104305201e8426989a9d
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
4 years agojgit: Add DfsBundleWriter 90/156490/3
Masaya Suzuki [Fri, 24 Jan 2020 00:47:40 +0000 (16:47 -0800)]
jgit: Add DfsBundleWriter

DfsBundleWriter writes out the entire repository to a Git bundle file.
It packs all objects included in the packfile by concatenating all pack
files. This makes the bundle creation fast and cheap. Useful for backing
up a repository as-is.

Change-Id: Iee20e4b1ab45b2a178dde8c72093c0dd83f04805
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
4 years agoMerge changes from topic "fix_ui"
Terry Parker [Thu, 3 Sep 2020 22:35:24 +0000 (18:35 -0400)]
Merge changes from topic "fix_ui"

* changes:
  ResolveMerger: do not content-merge gitlinks on del/mod conflicts
  ResolveMerger: Adding test cases for GITLINK deletion
  ResolveMerger: choose OURS on gitlink when ignoreConflicts
  ResolveMerger: improving content merge readability
  ResolveMerger: extracting createGitLinksMergeResult method
  ResolveMerger: Adding test cases for GITLINK merge

4 years agoBump Bazel version to 3.5.0 73/168773/1
Marco Miller [Thu, 3 Sep 2020 17:49:38 +0000 (13:49 -0400)]
Bump Bazel version to 3.5.0

This latest release includes cherry picks, a new feature and some
important changes [1].

[1] https://github.com/bazelbuild/bazel/releases/tag/3.5.0

Change-Id: Ie6966b0b56a351f98cb20b25daf3412740e68562
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
4 years agoMerge branch 'stable-5.9' 94/168694/1
Marco Miller [Wed, 2 Sep 2020 20:49:41 +0000 (16:49 -0400)]
Merge branch 'stable-5.9'

* stable-5.9:
  Upgrade maven-resources-plugin to 3.2.0
  Upgrade plexus-compiler version to 2.8.8
  [bazel] Add missing dependency to slf4j-api
  [errorprone] DirCacheEntry: make clear operator precedence
  [errorprone] PackWriter#parallelDeltaSearch: avoid suppressed exception
  [errorprone] Declare DirCache#version final
  Add jgit-4.17-staging target platform for 2020-09
  Update target platform to R20200831200620

Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Change-Id: I2e2f41cf6ebbcb45b8978b519db3f1c8f7afb5f4

4 years agoMerge changes Ib0b2dc7c,I827da397 into stable-5.9
Matthias Sohn [Wed, 2 Sep 2020 11:58:47 +0000 (07:58 -0400)]
Merge changes Ib0b2dc7c,I827da397 into stable-5.9

* changes:
  Upgrade maven-resources-plugin to 3.2.0
  Upgrade plexus-compiler version to 2.8.8

4 years agoUpgrade maven-resources-plugin to 3.2.0 10/168610/1
Marco Miller [Tue, 25 Aug 2020 20:42:56 +0000 (16:42 -0400)]
Upgrade maven-resources-plugin to 3.2.0

Change-Id: Ib0b2dc7c5b781dbc4ce26782c508b8c7e11641ed
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
4 years agoUpgrade plexus-compiler version to 2.8.8 09/168609/1
Marco Miller [Tue, 25 Aug 2020 20:34:50 +0000 (16:34 -0400)]
Upgrade plexus-compiler version to 2.8.8

Change-Id: I827da3973f489b03f9321b065dfb96ad7c29e270
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
4 years ago[bazel] Add missing dependency to slf4j-api 53/168453/3
Matthias Sohn [Mon, 31 Aug 2020 07:20:06 +0000 (09:20 +0200)]
[bazel] Add missing dependency to slf4j-api

Change-Id: I8a6b0cc8892ff4ba83d0f4a0d5801b1de27401f4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years ago[errorprone] DirCacheEntry: make clear operator precedence 52/168452/3
Matthias Sohn [Mon, 31 Aug 2020 00:22:37 +0000 (02:22 +0200)]
[errorprone] DirCacheEntry: make clear operator precedence

See https://errorprone.info/bugpattern/OperatorPrecedence

Change-Id: I96f2c844a7b3d9d5605122118d9420bde31ec2f0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years ago[errorprone] PackWriter#parallelDeltaSearch: avoid suppressed exception 51/168451/3
Matthias Sohn [Mon, 31 Aug 2020 00:18:43 +0000 (02:18 +0200)]
[errorprone] PackWriter#parallelDeltaSearch: avoid suppressed exception

See https://errorprone.info/bugpattern/Finally

Change-Id: Ic2ad0d1e1ba7552b5a5c6238f83c0e13a94254d0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years ago[errorprone] Declare DirCache#version final 50/168450/3
Matthias Sohn [Sun, 30 Aug 2020 22:51:08 +0000 (00:51 +0200)]
[errorprone] Declare DirCache#version final

Enums values should be immutable, see
https://errorprone.info/bugpattern/ImmutableEnumChecker.

Change-Id: Ib0a358d3a5f1560ca73ec3153ca8088fe7a35eb6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd jgit-4.17-staging target platform for 2020-09 40/168440/2
Matthias Sohn [Sun, 30 Aug 2020 22:41:41 +0000 (00:41 +0200)]
Add jgit-4.17-staging target platform for 2020-09

Change-Id: Ic3d3f7d1a4d13b40426675d29d8c521f1437f845
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate target platform to R20200831200620 39/168439/2
Matthias Sohn [Sun, 30 Aug 2020 22:37:03 +0000 (00:37 +0200)]
Update target platform to R20200831200620

and update to new Orbit version of the following libraries
- org.apache.commons.codec to 1.14.0.v20200818-1422
- org.apache.httpcomponents.httpclient to 4.5.10.v20200830-2311
- org.bouncycastle.bcpg [1.65.0.v20200527-1955
- org.bouncycastle.bcpkix [1.65.0.v20200527-1955
- org.bouncycastle.bcprov [1.65.1.v20200529-1514

Fix minor issues in target platforms and rename 4.16-staging to 4.16
since that version was released already.

Change-Id: Ifea2600e445e783807a5d94ea23ac3c6550956b5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.10.0-SNAPSHOT builds 38/168338/1
Matthias Sohn [Thu, 27 Aug 2020 14:14:36 +0000 (16:14 +0200)]
Prepare 5.10.0-SNAPSHOT builds

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