]> source.dussan.org Git - jgit.git/log
jgit.git
2 years agoPushCommand: consider push.default when no RefSpecs are given 29/136629/5
Rolf Theunissen [Sun, 10 Feb 2019 17:40:26 +0000 (18:40 +0100)]
PushCommand: consider push.default when no RefSpecs are given

When no RefSpecs are given, PushCommand until now simply fell back to
pushing the current branch to an upstream branch of the same name. This
corresponds to push.default=current. Any setting from the git config
for push.default was simply ignored.

Implement the other modes (nothing, matching, upstream, and simple),
too. Add a setter and getter for the PushDefault so that an application
can force a particular mode to be used. For backwards compatibility,
use "current" as the default setting; to figure out the value from the
git config, which defaults to "simple", call setPushDefault(null).

Bug: 351314
Change-Id: I86c5402318771e47d80b137e99947762e1150bb4
Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoPrevent that an instance of PushCommand is reused 74/190774/1
Thomas Wolf [Mon, 14 Feb 2022 09:44:51 +0000 (10:44 +0100)]
Prevent that an instance of PushCommand is reused

We checked if the command instance is called but missed to set the flag
tracking if it actually was used.

Change-Id: I0f9fb85c47945a4d91eab01ec5e1abc1ab83332a

2 years agoRemove unused warning suppression 01/190701/2
Fabio Ponciroli [Fri, 11 Feb 2022 08:19:31 +0000 (09:19 +0100)]
Remove unused warning suppression

SuppressWarnings is not used. Remove  to avoid
warnings at compile  time.

Change-Id: I84e3e57017cf9fd68d3377f866d4dd907ccde454

2 years agoSupport for git config push.default 62/190662/1
Thomas Wolf [Wed, 9 Feb 2022 17:33:31 +0000 (18:33 +0100)]
Support for git config push.default

Enhance the (unused!?) PushConfig; include a PushDefault enumeration.
Add simple tests for this PushConfig.

Bug: 351314
Change-Id: Ibc5656a2a1fccf70d00c5e15de8ed3dd8add6337
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoUpdate Orbit to S20220208191225 91/190591/3
Matthias Sohn [Tue, 8 Feb 2022 23:18:20 +0000 (00:18 +0100)]
Update Orbit to S20220208191225

Change-Id: I091d82a26fb058eaa40c03e5cec1b004969d0894

2 years agoMerge branch 'stable-6.0' 94/190594/2
Matthias Sohn [Tue, 8 Feb 2022 23:47:49 +0000 (00:47 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  Stop initCause throwing in readAdvertisedRefs

Change-Id: I2266814c613fd81e9dfc722532ac3daa30ca66b5

2 years agoMerge branch 'stable-5.13' into stable-6.0 93/190593/2
Matthias Sohn [Tue, 8 Feb 2022 23:32:10 +0000 (00:32 +0100)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Stop initCause throwing in readAdvertisedRefs

Change-Id: I94251601aa7fae9cc65164eaddcf16471874b11e

2 years agoStop initCause throwing in readAdvertisedRefs 50/190250/16
Darius Jokilehto [Fri, 4 Feb 2022 16:13:27 +0000 (16:13 +0000)]
Stop initCause throwing in readAdvertisedRefs

BasePackConnection::readAdvertisedRefsImpl was creating an exception by
calling `noRepository`, and then blindly calling `initCause` on it. As
`noRepository` can be overridden, it's not guaranteed to be missing a
cause.

BasePackPushConnection overrides `noRepository` and initiates a fetch,
which may throw a `NoRemoteRepositoryException` with a cause.

In this case calling `initCause` threw an `IllegalStateException`.

In order to throw the correct exception, we now return the
BasePackPushConnection exception and suppress the one thrown by
BasePackConnection

Bug: 578511
Change-Id: Ic1018b214be1e83d895979ee6c7cbce3f6765f6f

2 years agoSupport LFS Server URL without .git suffix 27/190527/6
Nail Samatov [Mon, 7 Feb 2022 15:13:58 +0000 (18:13 +0300)]
Support LFS Server URL without .git suffix

According to Git LFS documentation, URLs with and without .git suffix
should be supported. By default, Git LFS will append .git/info/lfs to
the end of a Git remote URL. To build the LFS server URL it will use:

Git Remote: https://git-server.com/foo/bar
LFS Server: https://git-server.com/foo/bar.git/info/lfs

Git Remote: https://git-server.com/foo/bar.git
LFS Server: https://git-server.com/foo/bar.git/info/lfs

Fix the LfsConnectionFactory accordingly. Move a utility method to
add the ".git" suffix if not present yet from FileResolver to
StringUtils and use it.

Bug: 578621
Change-Id: I8d3645872d5f03bb8e82c9c73647adb3e81ce484
Signed-off-by: Nail Samatov <sanail@yandex.ru>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[rebase] InteractiveHandler2: handle Gerrit Change-Ids 44/190444/1
Thomas Wolf [Thu, 3 Feb 2022 19:24:53 +0000 (20:24 +0100)]
[rebase] InteractiveHandler2: handle Gerrit Change-Ids

Add a way for the handler to tell whether the commit should generate a
Gerrit Change-Id. Augment the ModifyResult interface, and set the flag
on the CommitCommand.

This enables users to have a Change-ID be generated when squashing or
rewording commits. A possibly already existing Change-Id will remain
unchanged.

Bug: 440211
Change-Id: I66a72e0646876d162a7011235cca969e20acf060
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[errorprone] Fix DefaultCharset warning in BareSuperprojectWriterTest 51/190351/2
Luca Milanesio [Thu, 3 Feb 2022 01:20:19 +0000 (01:20 +0000)]
[errorprone] Fix DefaultCharset warning in BareSuperprojectWriterTest

Set the string encoding when converting a byte array into String,
avoiding the build-time warning on platform-dependent encoding.

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

Change-Id: I1f920043a8f303da43a8278793c38453e8773d69

2 years agoIntroduce a constant for the length of an abbreviated hash string 37/189337/5
Sebastian Schuberth [Wed, 5 Jan 2022 17:21:33 +0000 (18:21 +0100)]
Introduce a constant for the length of an abbreviated hash string

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350

2 years agoMake sure to close Repository in tests 34/190334/4
Fabio Ponciroli [Wed, 2 Feb 2022 19:05:55 +0000 (20:05 +0100)]
Make sure to close Repository in tests

Repository wasn't closed in FetchAndPullCommandsRecurseSubmodulesTest.
This caused a "Resource leak: 'g' is never closed" warning during
compilation.

Bug: 578546
Change-Id: I591ef1e286bcd9a7103c016fd47015e77fa95cbb

2 years agoFix resource leak in CancellableDigestOutputStreamTest 29/190329/7
Fabio Ponciroli [Wed, 2 Feb 2022 17:49:50 +0000 (18:49 +0100)]
Fix resource leak in CancellableDigestOutputStreamTest

CancellableDigestOutputStream resources are never closed in the tests.
This causes a "Resource leak: 'out' is never closed" warning
at compile time.

Suppress it by using a try with resources.

Bug: 578544
Change-Id: I0dc7de9162b8e3ac6fcaabe3002423f545baddb8

2 years agoFix "Empty block should be documented" warning 27/190327/2
Fabio Ponciroli [Wed, 2 Feb 2022 17:38:02 +0000 (18:38 +0100)]
Fix "Empty block should be documented" warning

Bug: 578543
Change-Id: Id7fb03c07c785ac0955e4969a9b781b707719749

2 years agoReplace deprecated org.eclipse.jgit.lib.RefDatabase.getRefs 45/190245/4
Fabio Ponciroli [Tue, 1 Feb 2022 15:48:14 +0000 (16:48 +0100)]
Replace deprecated org.eclipse.jgit.lib.RefDatabase.getRefs

The method has been deprecated since 5.0.
Use getRefsByPrefix instead.

Bug: 534731
Change-Id: I5f1cfc1fd5ae49dc7a4ed3e039f23ed785d674f6

2 years agoRebaseCommand: fix commit message in "fixup" case 28/189728/4
Thomas Wolf [Mon, 17 Jan 2022 23:37:33 +0000 (00:37 +0100)]
RebaseCommand: fix commit message in "fixup" case

JGit accumulated in MESSAGE_FIXUP commit messages of a fixup sequence,
just like it did in MESSAGE_SQUASH, and on the last step of a sequence
of fixups used that file, after stripping all comment lines, as the
commit message. That also stripped any lines from the original commit
message that happened to start with the comment character.

This is not how this is supposed to work. MESSAGE_FIXUP must contain
the original commit message of the base commit that is amended, and
the file contains the verbatim commit message for the final fixup.[1]

Change the implementation accordingly, and add new tests.

[1] https://github.com/git/git/blob/df3c41adeb/sequencer.c#L86 ff.

Bug: 513726
Change-Id: I885a2b7f10d6c74460a8693aa6cbf867ee0494a1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoreftable: close old Db in FileRepository#convertToPackedRefs 25/190225/3
Han-Wen Nienhuys [Tue, 1 Feb 2022 10:51:32 +0000 (11:51 +0100)]
reftable: close old Db in FileRepository#convertToPackedRefs

This fixes test failures on Windows.

Change-Id: I701fbeb99ffd7951514ae6eae8b28cceb9aebd9f

2 years agoreftable: tweaks for Windows 00/190200/4
Han-Wen Nienhuys [Mon, 31 Jan 2022 11:23:55 +0000 (12:23 +0100)]
reftable: tweaks for Windows

Reload the stack _before_ trying to delete the files. This ensures we
don't trip over our own open file handles when deleting compacted
tables.

If there is another process reading the file, it may be impossible to
delete the compacted tables. In this case, ignore the failure.

For cleaning the garbage in this case, the protocol as described in
https://www.git-scm.com/docs/reftable#_windows should be implemented.
This is left for another commit.

Bug: 578454
Change-Id: I7aa43508450041eb9376d9f67a0262ff7cc53c73

2 years agoMerge changes I11366273,I256e1572
Ivan Frade [Tue, 1 Feb 2022 22:41:44 +0000 (17:41 -0500)]
Merge changes I11366273,I256e1572

* changes:
  RepoCommand: Offer to set extra files in the destination repository
  RepoCommand: Move bare/regular superproject writing to their own classes

2 years agoMerge "[test] Fix EolRepositoryTest for eol=native"
Matthias Sohn [Tue, 1 Feb 2022 10:23:14 +0000 (05:23 -0500)]
Merge "[test] Fix EolRepositoryTest for eol=native"

2 years ago[test] Fix EolRepositoryTest for eol=native 15/190215/1
Thomas Wolf [Mon, 31 Jan 2022 23:52:36 +0000 (00:52 +0100)]
[test] Fix EolRepositoryTest for eol=native

On Windows eol=native, which is also the default if nothing else
overrides it, means convert text files to CRLF on checkout.

Adapt tests for this. Also don't fiddle with the real system property
"line.separator", use the mocked SystemReader for this.

Bug: 550111
Change-Id: Ie19b80fc543fa4970d6d9f181041c5f4d6ef3ed4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-6.0' 14/190214/1
Matthias Sohn [Mon, 31 Jan 2022 23:28:05 +0000 (00:28 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  Fix warning: The value of the parameter otp is not used

Change-Id: I47996285c49ce85ab0bb835956a9ef58ed71de20

2 years agoFix FS_Win32 if a non-directory is listed 93/190193/2
Thomas Wolf [Mon, 31 Jan 2022 08:39:12 +0000 (09:39 +0100)]
Fix FS_Win32 if a non-directory is listed

FS.list() is supposed to return an empty array if the File given is not
a directory.

Bug: 550111
Change-Id: I245da5f1f2bdafd9dfb38fb8d7eff27d900cd5a8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix ConfigTest for Windows 91/190191/3
Thomas Wolf [Mon, 31 Jan 2022 07:58:17 +0000 (08:58 +0100)]
[test] Fix ConfigTest for Windows

Escape paths when writing them to a config file to ensure they work
with backslashes and unusual characters.

Bug: 550111
Change-Id: Iedc5c0f2c0c02ac6cadf43cdae0f0d19578aed91
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix CommitTemplateConfigTest for Windows 90/190190/3
Thomas Wolf [Mon, 31 Jan 2022 07:43:57 +0000 (08:43 +0100)]
[test] Fix CommitTemplateConfigTest for Windows

Ensure that this test works on Windows.

Bug: 550111
Change-Id: Ib3ca803f4d9521a5f2a0e1344bfbc0d2beccc9cc
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] RepoCommandTest: guard tests for executable files 89/190189/2
Thomas Wolf [Mon, 31 Jan 2022 07:25:44 +0000 (08:25 +0100)]
[test] RepoCommandTest: guard tests for executable files

On Windows, java.io.File.canExecute is always true. Guard assertions
testing the executable bit with FS.DETECTED.supportsExecute().

Bug: 550111
Change-Id: I2704d122f5b1086d01a0503a8c047a02ecbc1d4a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoRepoCommand: Offer to set extra files in the destination repository 73/188073/2
Ivan Frade [Tue, 23 Nov 2021 22:42:01 +0000 (14:42 -0800)]
RepoCommand: Offer to set extra files in the destination repository

We want to save in the destination repository what manifest created its
structure. This helps to detect and debug failures in the manifest ->
superproject translations. The src commit should be easily readable from
the superproject tip.

Offer an API to write a file in the destination repository. RepoCommand
callers (e.g. gerrit supermanifest plugin) can use this to add a
file with the repo/ref/hash of the manifest.

Alternatives considered to write the source repo/ref/hash:

  * .gitattributes of the .gitmodules file. Some updates in the manifest
    don't touch the .gitmodules (e.g. a linkfile change), so it can fall
    out of sync.

  * commit message. Caller would need to follow the commit history to
    find the latest modification by repo command. This is not helpful
    e.g. for build bots that want to get the value in one call.

Change-Id: I113662734a7ccd39cbc60b46ad3f73038c807682

2 years agoRepoCommand: Move bare/regular superproject writing to their own classes 03/184503/11
Ivan Frade [Thu, 26 Aug 2021 20:19:01 +0000 (13:19 -0700)]
RepoCommand: Move bare/regular superproject writing to their own classes

RepoCommand parses the manifest to get a list of projects, clears up
conflicts and then writes to the superproject. The first steps are
common but the writing is completely different for bare or "regular"
(with working dir) repository.

Split writing to bare and regular repos into its own classes. This
simplifies RepoCommand class and makes clearer what happens on each side
(e.g. many options apply only to bare repos).

Change-Id: I256e15729bd53ee15fc56de88bce86a2edb2417a

2 years agoMerge conflict messages: prefix conflict lines with a hash 26/189726/2
Thomas Wolf [Sun, 16 Jan 2022 14:50:00 +0000 (15:50 +0100)]
Merge conflict messages: prefix conflict lines with a hash

C git also does so. Note that currently the comment character is
hard-coded as the hash '#' throughout JGit.

Bug: 548529
Change-Id: I4a5597694082a9e5b07412b365cfaf41fa034cfa
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoRebaseCommand: better commit message rewording 25/189725/2
Thomas Wolf [Sat, 15 Jan 2022 22:11:41 +0000 (23:11 +0100)]
RebaseCommand: better commit message rewording

Respect git config commit.cleanup for rewording. Note that by default
this is CleanupMode.STRIP, whereas before this change, JGit would take
the reworded message verbatim.

Squashing was the only place in JGit where it automatically and
unconditionally removed comment lines from commit messages. In other
places it didn't do so, and client code needed to do so.

Unconditionally removing comments is problematic if the commit message
_should_ contain some line starting with a hash, which can easily occur
with the way Github, Gitlab, and other git web servers link to issues
or PRs: they all allow the short-hand "#<number>".

Introduce a new InteractiveHandler2 extension interface, which can
return the edited message _and_ a clean-up mode. This way, client code
can decide on its own how to clean the message, and if JGit shouldn't
do any further cleaning, it can return CleanupMode.VERBATIM. Or
CleanupMode.WHITESPACE. (In the case of SQUASH, it is then of course
the client's responsibility to remove the squash comment lines.)

If the old InteractiveHandler interface is used, CleanupMode.STRIP is
applied unconditionally for squashing, as before.

Bug: 578173
Change-Id: Ia0040c247884e684587dd45d6cb85f8b72a4b876
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoCommitCommand: commit message cleanup 24/189724/2
Thomas Wolf [Mon, 17 Jan 2022 19:28:25 +0000 (20:28 +0100)]
CommitCommand: commit message cleanup

Use CommitConfig.CleanupMode to implement git commit --cleanup. Add
setters for the clean-up mode, the comment character, and for the
default default clean-up mode.

Behavior of existing client code is unchanged as the default clean-up
mode is set to "verbatim". To use git config defaults, one can call
setCleanupMode(CleanupMode.DEFAULT). The default comment character
is hard-coded as '#' for now, as in other parts of JGit. Implementing
full support for core.commentChar shall be done in a separate change.

Bug: 553065
Change-Id: I470785e464a762d3f409f163f1cbdbb98dd81aaf
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoProvide git config commit.cleanup 23/189723/2
Thomas Wolf [Sat, 15 Jan 2022 21:51:06 +0000 (22:51 +0100)]
Provide git config commit.cleanup

Add an enumeration for the possible values, and a method to resolve the
"default" value. Give CommitConfig a static method to process a text
according to a given clean-up mode and comment character.

(The core.commentChar is not yet handled by JGit; it's hard-coded as #.)

Bug: 553065
Change-Id: If6e384522275f73b713fbc29ffcaa1753c239dea
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix closing of test repositories 86/185486/7
Nail Samatov [Wed, 15 Sep 2021 18:00:59 +0000 (21:00 +0300)]
[test] Fix closing of test repositories

Fix tests failing on Windows because Repository instance is created but
not closed on tear down.

Fix repositories closed twice, except in tests that test this behavior
explicitly.

Name the temporary directories the tests run in after the test method;
that makes it easier to figure out in which tests repositories are
closed twice if it should occur again in the future.

Bug: 550111
Change-Id: I9398b58f0f36d2c29236d2a9a8599117d9083980
Signed-off-by: Nail Samatov <sanail@yandex.ru>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] DirCacheCheckoutTest: fix test expectation for eol=native 86/190186/1
Thomas Wolf [Sun, 30 Jan 2022 21:47:38 +0000 (22:47 +0100)]
[test] DirCacheCheckoutTest: fix test expectation for eol=native

With eol=native, we expect LF on Unixes, and CR-LF on Windows. One test
didn't account for this and always expected LF, and thus failed on
Windows.

Bug: 550111
Change-Id: I69354ac691c464d1b6003812ddb4510c5ab5e77a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoObjectWalk: close ObjectReader on close() if needed 85/190185/2
Thomas Wolf [Sun, 30 Jan 2022 21:15:14 +0000 (22:15 +0100)]
ObjectWalk: close ObjectReader on close() if needed

If the walk is created via ObjectWalk(Repository), it creates a new
ObjectReader. This reader was closed only on dispose(). If such an
ObjectWalk was used in a try-with-resource statement the reader might
not get closed.

Bug: 578458
Change-Id: I1be31829dc466530f23006a53c29b657fd5fb410
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix a Windows-only test in CheckoutCommandTest 84/190184/1
Thomas Wolf [Sun, 30 Jan 2022 20:43:13 +0000 (21:43 +0100)]
[test] Fix a Windows-only test in CheckoutCommandTest

Test.txt should not be in the "removed" list if it can't be deleted
but only in the "not deleted" list. The test was wrong.

Bug: 550111
Change-Id: I3ecede4278014c15015c8c24089647fa3db3742f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix ApplyCommandTest for Windows 83/190183/1
Thomas Wolf [Sun, 30 Jan 2022 20:27:33 +0000 (21:27 +0100)]
[test] Fix ApplyCommandTest for Windows

Some tests checked whether or not a file is executable via
java.io.File.canExecute(). But that always returns true on Windows.

Use FS.DETECTED.canExecute() instead, and guard all such assertions to
run only of file systems that do support the "execute" flag.

Bug: 550111
Change-Id: Iacb9e414b612359fcecb61312c3dfb830801cd36
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[test] Fix OpenSshConfigFileTest for Windows 82/190182/1
Thomas Wolf [Sun, 30 Jan 2022 19:59:26 +0000 (20:59 +0100)]
[test] Fix OpenSshConfigFileTest for Windows

The tests assumed that a path like "/tmp" was an absolute path, and
also compared against strings with forward slashes. On Windows, "/tmp"
is not an absolute path and thus resolved against the current directory,
and the separator is a backslash.

Change the tests to use ~/ notation, and test paths resolved against
the (mocked) user home directory. That way, the tests are independent
of the file system used.

Bug: 550111
Change-Id: I1c31608ca83c8d8586256d1586a792e4a33cfaa4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoBinaryHunkInputStream: accept CR-LF 81/190181/2
Thomas Wolf [Sun, 30 Jan 2022 16:30:22 +0000 (17:30 +0100)]
BinaryHunkInputStream: accept CR-LF

Let's be lenient and accept hunk lines terminated by CR-LF, too, not
just lines terminated by LF.

Bug: 550111
Change-Id: I7f796df666300ab56cc6c07f22eda45fbf4c941e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: Add README.md for SSH agents 79/189379/4
Thomas Wolf [Thu, 30 Dec 2021 16:49:44 +0000 (17:49 +0100)]
sshd: Add README.md for SSH agents

Explain SSH agent protocols, what transports are available and how to
choose them in ~/.ssh/config. For Windows, add some information on
which commonly used SSH agents can be used.

Change-Id: I0b08a95654fd76643512606edb1ed74d9980aa85
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: support the ConnectTimeout ssh config 78/189378/3
Thomas Wolf [Wed, 29 Dec 2021 19:11:04 +0000 (20:11 +0100)]
sshd: support the ConnectTimeout ssh config

Parse the value from the ssh config and if set use it when connecting.

Change-Id: I85b44c9468a5027602375706612c46ea7a99b2bd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: Skip unknown keys from the SSH agent 77/189377/3
Thomas Wolf [Wed, 29 Dec 2021 19:33:33 +0000 (20:33 +0100)]
sshd: Skip unknown keys from the SSH agent

An SSH agent might contain keys that Apache MINA sshd cannot handle.
Pageant for instance can contain ed448 keys, which are not implemented
in OpenSSH or in Apache MINA sshd.

When an agent delivers such keys, simply skip (and log) them. That way,
we can work with the remaining keys. Otherwise a single unknown key in
the agent would break pubkey authentication.

Change-Id: I3945d932c7e64b628465004cfbaf10f4dc05f3e4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: support the AddKeysToAgent ssh config 76/189376/3
Thomas Wolf [Tue, 28 Dec 2021 18:54:30 +0000 (19:54 +0100)]
sshd: support the AddKeysToAgent ssh config

Add parsing of the config. Implement the SSH agent protocol for adding
a key. In the pubkey authentication, add keys to the agent as soon as
they've been loaded successfully, before even attempting to use them
for authentication. OpenSSH does the same.

Bug: 577052
Change-Id: Id1c08d9676a74652256b22281c2f8fa0b6508fa6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: handle "IdentityAgent SSH_AUTH_SOCK" in ssh config 75/189375/3
Thomas Wolf [Tue, 28 Dec 2021 17:07:21 +0000 (18:07 +0100)]
sshd: handle "IdentityAgent SSH_AUTH_SOCK" in ssh config

OpenSSH has (for legacy reasons?) the option of specifying the default
environment variable directly, instead of using ${SSH_AUTH_SOCK}. Make
sure the plain variable name is not taken as a relative path name.

Bug: 577053
Change-Id: If8f550dffc43887254f71aa0b487c50fa14d0627
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: Connector for the Win32-OpenSSH SSH agent 74/189374/3
Thomas Wolf [Mon, 27 Dec 2021 20:39:23 +0000 (21:39 +0100)]
sshd: Connector for the Win32-OpenSSH SSH agent

Win32-OpenSSH uses a named Windows pipe for communication. Implement
a connector for this mechanism using JNA. Choose the appropriate
connector based on the setting of the 'identityAgent' parameter.

Bug: 577053
Change-Id: I205f07fb33654aa18ca5db92706e65544ce38641
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: handle IdentitiesOnly with an SSH agent 73/189373/3
Thomas Wolf [Mon, 27 Dec 2021 18:50:24 +0000 (19:50 +0100)]
sshd: handle IdentitiesOnly with an SSH agent

If an SSH agent is used but "IdentitiesOnly yes" is set, only those
keys from the agent that correspond to one of the keys explicitly given
via an IdentityFile directive are to be used.

Implement this by filtering the list of keys obtained from the agent
against the list of IdentityFiles, each entry suffixed with ".pub".
Load the public keys from these files, and ignore all other keys from
the agent. Keys without ".pub" file are also ignored.

Apache MINA sshd has no operation to load only the public key from a
private key file, so we have to rely on *.pub files.

Bug: 577053
Change-Id: I75c2c0b3ce35781c933ec2944bd6da1b94f4caf9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agosshd: support IdentityAgent config 72/189372/3
Thomas Wolf [Sun, 26 Dec 2021 13:36:48 +0000 (14:36 +0100)]
sshd: support IdentityAgent config

Handle the 'none' value, and change the value to select Pageant to
something that looks like an absolute UNC path name to avoid it's
handled as an relative path name.

Bug: 577053
Change-Id: I4ccf047abbc1def50e2782319e4fa7c744069401
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoLFS: Fix error occurring during delete branch 93/189893/3
Nail Samatov [Fri, 21 Jan 2022 16:30:51 +0000 (19:30 +0300)]
LFS: Fix error occurring during delete branch

Fix TransportException occurring when deleting
a branch and push that change to remote repository
if BuiltinLFS is used to work with repository.
When finding LFS pointers in RemoteRepUpdate,
LfsPrePushHook fails to open ObjectReader
with new object id equal to ObjectId.zeroId().
If update is a deleting update (new object id is zero id),
we can assume that this update doesn't contain LFS Pointer
and we can skip step with extracting LFS pointer for that
RemoteRefUpdate.

Bug: 578313
Change-Id: Ic4367978338b8234d39d9af0d9674490f79fc22d
Signed-off-by: Nail Samatov <sanail@yandex.ru>
2 years agoMerge "PackOutputStream: Extract cancellation and digest to superclass"
Ivan Frade [Thu, 27 Jan 2022 16:42:54 +0000 (11:42 -0500)]
Merge "PackOutputStream: Extract cancellation and digest to superclass"

2 years agoPackOutputStream: Extract cancellation and digest to superclass 09/189909/2
kylezhao [Sat, 22 Jan 2022 08:54:20 +0000 (16:54 +0800)]
PackOutputStream: Extract cancellation and digest to superclass

Checking the cancelled status and keeping a digest of the written data
is useful for other output streams. e.g. to write commit-graphs.

Pull up that functionality to a superclass, so it can be reused.

Change-Id: I177b50be09c4ea631e7a144cc6127085ec2ca411
Signed-off-by: kylezhao <kylezhao@tencent.com>
2 years agoBazel: Include bazel resource configuration file for RBE build 20/189920/2
David Ostrovsky [Sat, 22 Jan 2022 19:37:20 +0000 (20:37 +0100)]
Bazel: Include bazel resource configuration file for RBE build

In I988f61e34 tools/remote-bazelrc was added, but this resource file
wasn't imported from main resource file workspace/.bazelrc.

Change-Id: Ie0c2f128fbccaa6f9e99ad29a3a76ac294f3cd29

2 years agoMerge "DFS block cache: report index load and evict stats"
Ivan Frade [Fri, 21 Jan 2022 19:59:30 +0000 (14:59 -0500)]
Merge "DFS block cache: report index load and evict stats"

2 years agoDFS block cache: report index load and evict stats 94/189194/3
Alina Djamankulova [Wed, 29 Dec 2021 23:07:27 +0000 (15:07 -0800)]
DFS block cache: report index load and evict stats

Enhance cache performance monitoring for large data such as pack and
bitmap indexes. Provide details about what is loaded and evicted from
cache like total number of cache hits, time in cache before eviction.

Add a custom consumer to report loading events and eviction events when
enabled.

Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: I5739325db7ff7ec370e4defd8f7e46f1c3f5d2dd

2 years agoFix warning: The value of the parameter otp is not used 22/189822/1
Antonio Barone [Thu, 20 Jan 2022 10:58:09 +0000 (11:58 +0100)]
Fix warning: The value of the parameter otp is not used

Silence warning by removing unused argument to the beginCopyAsIs()
method.

Change-Id: I94e7ff1c61cf8b03752de2974baa24b9c061c163

2 years agoBazel: Add RBE support 92/189792/4
David Ostrovsky [Wed, 19 Jan 2022 18:26:54 +0000 (19:26 +0100)]
Bazel: Add RBE support

The Bazel build can be used with Google's Remote Build Execution.

This needs the following setup steps:

  $ gcloud auth application-default login
  $ gcloud services enable remotebuildexecution.googleapis.com  --project=${PROJECT}

Create a worker pool. The instances should have at least 4 CPUs each
for adequate performance.

  $ gcloud alpha remote-build-execution worker-pools create default \
    --project=${PROJECT} \
    --instance=default_instance \
    --worker-count=50 \
    --machine-type=e2-standard-4 \
    --disk-size=200

To use RBE, execute

  $ bazel test --config=remote \
    --remote_instance_name=projects/${PROJECT}/instances/default_instance \
    //...

Change-Id: I988f61e342dab2136d8752ace945a4ed91a4189a

2 years agoBazel: Switch to using toolchain resolution for java rules 32/189132/9
David Ostrovsky [Fri, 24 Dec 2021 06:43:48 +0000 (07:43 +0100)]
Bazel: Switch to using toolchain resolution for java rules

Bump Bazel version to release 5.0.0. In this new Bazel release,
--incompatible_use_toolchain_resolution_for_java_rules is flipped, that
means that the build must be adapted to toolchain resolution.

Specification toolchain resolution for java rules is here: [1]. Main
tracking Bazel issue is here: [2].

Given that new Bazel release also added support for remote JDK 17, add
experimental support for building with remote JDK 17 to produce major
byte code version 61.

Test Plan:

To build with remote JDK 11 run:

  $ bazel build :all

To build with remote JDK 17 run:

  $ bazel build --config java17 :all

[1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing
[2] https://github.com/bazelbuild/bazel/issues/7849

Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041

2 years agoBazel: Simplify java 11 toolchain definition 59/189459/3
David Ostrovsky [Mon, 10 Jan 2022 21:27:14 +0000 (22:27 +0100)]
Bazel: Simplify java 11 toolchain definition

Also remove unused JDK9_JVM_OPTS constant.

Change-Id: I0f45ca8312a2a8c3aee3855e3ef3afa95808b4ad

2 years agoBazel: Format build files with buildifier 58/189458/3
David Ostrovsky [Mon, 10 Jan 2022 21:07:09 +0000 (22:07 +0100)]
Bazel: Format build files with buildifier

Change-Id: I1ff38237058d11a3f61acc881c504382ff4b7e08

2 years agoBazel: Remove JDK 15 toolchain definition 57/189457/3
David Ostrovsky [Mon, 10 Jan 2022 20:58:26 +0000 (21:58 +0100)]
Bazel: Remove JDK 15 toolchain definition

Java 15 is outdated and the recent Bazel releases added support to
JDK 17.

Change-Id: I68c1f5b5132d844f07bfefc22f81ecf0a19df910

2 years agoBazel: Remove version check 56/189456/3
David Ostrovsky [Mon, 10 Jan 2022 20:55:08 +0000 (21:55 +0100)]
Bazel: Remove version check

Recent Bazel releases perform Bazel version check, based on
.bazelversion file.

Change-Id: I92d5daaef8ecbd011517d314564c0f5492c8ea75

2 years agoExternalToolTest: Rename class name to usual name for test cases 55/189455/3
David Ostrovsky [Mon, 10 Jan 2022 20:18:24 +0000 (21:18 +0100)]
ExternalToolTest: Rename class name to usual name for test cases

Change-Id: I00e4a5e73f530b7ac671d09b9b447bb24d6419fa

2 years agoBazel: Add missing java packages to error_prone package group 52/189452/4
David Ostrovsky [Mon, 10 Jan 2022 19:59:38 +0000 (20:59 +0100)]
Bazel: Add missing java packages to error_prone package group

Change-Id: I709a3cd2639e9209b2c92c700e04ab4c90ed0524

2 years agoAdapt junit_tests invocation to removal of resource_jars attribute 51/189451/3
David Ostrovsky [Mon, 10 Jan 2022 19:56:24 +0000 (20:56 +0100)]
Adapt junit_tests invocation to removal of resource_jars attribute

In upcoming Bazel release 5.0 resource_jars attribute was removed: [1].
Replace resource_jars with runtime_deps as recommended in the release
notes.

[1] https://github.com/bazelbuild/bazel/issues/13221

Change-Id: Iab834d647cf63259ca182adc1f862b6001db0cce

2 years agoUpdate orbit to I20220111151929 85/189685/2
Matthias Sohn [Tue, 11 Jan 2022 23:19:56 +0000 (00:19 +0100)]
Update orbit to I20220111151929

and update
- com.google.gson to 2.8.9.v20220111-1409
- org.bouncycastle.bcpg to 1.70.0.v20220105-1522
- org.bouncycastle.bcpkix to 1.70.0.v20220105-1522
- org.bouncycastle.bcprov to 1.70.0.v20220105-1522
- org.bouncycastle.bcutil to 1.70.0.v20220105-1522

Change-Id: I7d9159e0e8524459a11da84cb2db709cb1f0823d

2 years agoUpdate org.apache.maven.wagon:wagon-ssh to 3.5.1 84/189684/2
Matthias Sohn [Wed, 12 Jan 2022 13:02:23 +0000 (14:02 +0100)]
Update org.apache.maven.wagon:wagon-ssh to 3.5.1

Change-Id: I90807ef1ae065a8a8559e445c0aa7e2abdd2b9a8

2 years agoUpdate org.eclipse.jdt:ecj to 3.28.0 83/189683/2
Matthias Sohn [Tue, 11 Jan 2022 15:41:26 +0000 (16:41 +0100)]
Update org.eclipse.jdt:ecj to 3.28.0

Change-Id: I7573d8cfd07038bca4a7ed9e122e5dcf666632f8

2 years agoUpdate org.osgi:org.osgi.core to 6.0.0 82/189682/2
Matthias Sohn [Wed, 12 Jan 2022 13:04:51 +0000 (14:04 +0100)]
Update org.osgi:org.osgi.core to 6.0.0

Change-Id: If93e0e8769fcbb92befa1f159f48b0ac6b6f3d24

2 years ago[errorprone] Fix implicit use of platform default charset 81/189681/2
Matthias Sohn [Wed, 12 Jan 2022 00:53:34 +0000 (01:53 +0100)]
[errorprone] Fix implicit use of platform default charset

Change-Id: I42f893c4248d8b00bf4aaf59cd528c43940f99e2

2 years ago[bazel] Fix build of ExternalDiffToolTest 80/189680/2
Matthias Sohn [Wed, 12 Jan 2022 16:05:25 +0000 (17:05 +0100)]
[bazel] Fix build of ExternalDiffToolTest

Change-Id: Ida4721142f49c86aa3f05aeffc6ca0aef40939f9

2 years agoLet org.eclipse.jgit.pgm use BooleanTriState 79/189679/2
Matthias Sohn [Tue, 11 Jan 2022 22:42:53 +0000 (23:42 +0100)]
Let org.eclipse.jgit.pgm use BooleanTriState

Change-Id: I575cd5e1ecd326514a8bb4c36a86a2dc71ba5457

2 years agoMerge branch 'stable-6.0' 67/189767/1
Matthias Sohn [Wed, 19 Jan 2022 08:53:21 +0000 (09:53 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory
  [errorprone] Fix InfiniteRecursion error in RecordingLogger
  [errorprone] Suppress Finally error in ObjectDownloadListener
  [errorprone] Fix implicit use of default charset in FileBasedConfigTest
  [errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc

Change-Id: I08d58c8f3f04e3a920da43b5fb252b1654c2b33c

2 years agoMerge changes I6a22f37f,I092389e4,I20af1d8d,I83332efc into stable-6.0
Matthias Sohn [Wed, 19 Jan 2022 08:50:59 +0000 (03:50 -0500)]
Merge changes I6a22f37f,I092389e4,I20af1d8d,I83332efc into stable-6.0

* changes:
  [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory
  [errorprone] Fix InfiniteRecursion error in RecordingLogger
  [errorprone] Suppress Finally error in ObjectDownloadListener
  [errorprone] Fix implicit use of default charset in FileBasedConfigTest

2 years agoMerge "[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc" into...
Matthias Sohn [Wed, 19 Jan 2022 08:43:27 +0000 (03:43 -0500)]
Merge "[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc" into stable-6.0

2 years agoMerge branch 'stable-6.0' 48/189748/1
Matthias Sohn [Tue, 18 Jan 2022 17:09:03 +0000 (18:09 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  UploadPack v2 protocol: Stop negotiation for orphan refs
  Complete update to servlet api 4.0.0

Change-Id: I55ab6e8fd4a76e4313e37b12f9fc5d5e4b84a681

2 years agoMerge branch 'stable-5.13' into stable-6.0 47/189747/1
Matthias Sohn [Tue, 18 Jan 2022 17:07:59 +0000 (18:07 +0100)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  UploadPack v2 protocol: Stop negotiation for orphan refs

Change-Id: I6a9ed8338ffbf5363e48d640a2c4209e4e503549

2 years agoMerge branch 'stable-5.12' into stable-5.13 46/189746/1
Matthias Sohn [Tue, 18 Jan 2022 16:51:14 +0000 (17:51 +0100)]
Merge branch 'stable-5.12' into stable-5.13

* stable-5.12:
  UploadPack v2 protocol: Stop negotiation for orphan refs

Change-Id: Ib43068c32d9cb8effe4b873396391dc3c9197a6e

2 years agoMerge branch 'stable-5.11' into stable-5.12 45/189745/1
Matthias Sohn [Tue, 18 Jan 2022 16:49:03 +0000 (17:49 +0100)]
Merge branch 'stable-5.11' into stable-5.12

* stable-5.11:
  UploadPack v2 protocol: Stop negotiation for orphan refs

Change-Id: I5db432bd416cfa8d3dd295bdce63e31d5f160a8a

2 years ago[bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory 76/189576/2
Matthias Sohn [Wed, 12 Jan 2022 22:45:34 +0000 (23:45 +0100)]
[bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory

Move this test to another class and skip it when running tests with
bazel since the bazel test runner does not allow to create files in the
home directory.

FS#userHome retrieves the home directory on the first call and caches it
for subsequent calls to avoid overhead in case path translation is
required (currently on cygwin). This prevents that the test can mock the
home directory using MockSystemReader like SshTestHarness does.

Change-Id: I6a22f37f4a19eb4b4935509eae508a23e56db7aa

2 years ago[errorprone] Fix InfiniteRecursion error in RecordingLogger 75/189575/2
Matthias Sohn [Wed, 12 Jan 2022 01:00:41 +0000 (02:00 +0100)]
[errorprone] Fix InfiniteRecursion error in RecordingLogger

Change-Id: I092389e428232a4fe7613d846c288d285ae9102c

2 years ago[errorprone] Suppress Finally error in ObjectDownloadListener 74/189574/2
Matthias Sohn [Wed, 12 Jan 2022 16:45:26 +0000 (17:45 +0100)]
[errorprone] Suppress Finally error in ObjectDownloadListener

Change-Id: I20af1d8d931608e93fbc52e127f1b7bafd2f917c

2 years ago[errorprone] Fix implicit use of default charset in FileBasedConfigTest 73/189573/2
Matthias Sohn [Wed, 12 Jan 2022 01:02:35 +0000 (02:02 +0100)]
[errorprone] Fix implicit use of default charset in FileBasedConfigTest

Change-Id: I83332efc498a5bce242915a1eec2346e6e1f58fd

2 years ago[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc 72/189572/2
Matthias Sohn [Wed, 12 Jan 2022 00:52:26 +0000 (01:52 +0100)]
[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc

Ignore the FutureReturnValueIgnored warning for the unused return value
of #gc.

Change-Id: I4e7a2f85d404962c01726f9a1d079fe4a6430a1b

2 years agoUploadPack v2 protocol: Stop negotiation for orphan refs 87/189087/6
Marcin Czech [Wed, 22 Dec 2021 16:42:36 +0000 (17:42 +0100)]
UploadPack v2 protocol: Stop negotiation for orphan refs

The fetch of a single orphan ref (for example Gerrit meta ref:
refs/changes/21/21/meta) did not stop the negotiation so client
had to advertise all refs. This impacts the fetch performance
on repositories with a large number of refs (for example on
Gerrit repository it takes 20 seconds to fetch meta ref
comparing to 1.2 second to fetch ref with parent).

To avoid this issue UploadPack, used on the server side,
now checks if all `want` refs have parents, if not this
means that client doesn't need any extra objects, hence
the server responds with `ready` and finishes the
negotiation phase.

Bug: 577937
Change-Id: Ia3001b400b415d5cf6aae45e72345ca08d3af058

2 years agoComplete update to servlet api 4.0.0 71/189571/1
Matthias Sohn [Wed, 12 Jan 2022 17:37:02 +0000 (18:37 +0100)]
Complete update to servlet api 4.0.0

Ibd0240cf7ad updated servlet-api to 4.0.0 only partially for the
osgi-based build in Eclipse.

Complete this by updating dependencies also in maven and bazel build.

Change-Id: Ic4c3eb78c538007ca2177f6109d415147e58eabe

2 years agoSwitch to Apache MINA sshd 2.8.0 71/188371/6
Thomas Wolf [Tue, 30 Nov 2021 22:56:44 +0000 (23:56 +0100)]
Switch to Apache MINA sshd 2.8.0

Update version in root pom.xml, adapt code & manifests. Bump the
dependency in the bazel build.

Update Orbit to I20220105095044 to get Apache MINA sshd 2.8.0 and
regenerate all target platforms.

Bug: 577542
Change-Id: Iefc02ceda8a9b0683f49aa8059999a5486d1f322
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge changes Ia744cd4a,Id95350c7,I746b7fb7
Thomas Wolf [Thu, 6 Jan 2022 19:05:00 +0000 (14:05 -0500)]
Merge changes Ia744cd4a,Id95350c7,I746b7fb7

* changes:
  sshd: backport upstream fix for SSHD-1231
  [releng] bump japicmp base version and configure sshd bundles
  Merge branch 'stable-6.0'

2 years agosshd: backport upstream fix for SSHD-1231 55/189355/1
Thomas Wolf [Thu, 6 Jan 2022 18:33:44 +0000 (19:33 +0100)]
sshd: backport upstream fix for SSHD-1231

SSHD-1231[1] may lead to exceptions when trying to authenticate first
with an RSA key that is rejected by the server. The upstream fix is a
one-liner but unfortunately didn't make it into Apache MINA sshd 2.8.0.

Incorporate the upstream fix in JGitPublicKeyAuthentication, and add
a test case for this.

[1] https://issues.apache.org/jira/browse/SSHD-1231

Bug: 577545
Change-Id: Ia744cd4aa569bccd937c855f3bb45c0116915bad
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoAdd myself to .mailmap 36/189336/1
Sebastian Schuberth [Thu, 6 Jan 2022 08:04:40 +0000 (09:04 +0100)]
Add myself to .mailmap

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: I46e7bccb6c0c1e4dc21450220279b0546723773e

2 years ago[releng] bump japicmp base version and configure sshd bundles 59/189159/2
Thomas Wolf [Mon, 27 Dec 2021 10:32:15 +0000 (11:32 +0100)]
[releng] bump japicmp base version and configure sshd bundles

Bump the japicmp base version to 6.0.0.202111291000-r and configure
the o.e.j.ssh.apache and o.e.j.ssh.apache.agent bundles to ignore
internal classes.

Change-Id: Id95350c73b9141e1583f9de5fb6ab2496c7407d9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-6.0' 21/189321/1
Thomas Wolf [Wed, 5 Jan 2022 14:59:54 +0000 (15:59 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  Use slf4j-simple instead of log4j for logging
  Update orbit to R20211213173813

Change-Id: I746b7fb71571020ce49f7b50fd675c9864327719
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.13' into stable-6.0 20/189320/1
Thomas Wolf [Wed, 5 Jan 2022 13:54:39 +0000 (14:54 +0100)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Use slf4j-simple instead of log4j for logging
  Update orbit to R20211213173813

Change-Id: I219ef3901c1d908b91bf9c8f00431b22686ff7a5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoUse slf4j-simple instead of log4j for logging 24/188924/7
Matthias Sohn [Thu, 16 Dec 2021 17:42:45 +0000 (18:42 +0100)]
Use slf4j-simple instead of log4j for logging

JGit uses slf4j-api as logging API.

The libraries
- org.eclipse.jgit.http.test
- org.eclipse.jgit.pgm
- org.eclipse.jgit.ssh.apache.test
- org.eclipse.jgit.test
used the outdated log4j 1.2.15 which is EOL since years.

Since both jgit command line and also the tests don't need sophisticated
logging features replace log4j with the much simpler slf4j-simple log
implementation. The org.slf4j.binding.simple 1.7.30 archive has only
25kB instead of 429kB for log4j 1.2.15

Applications using jgit are free to choose any other log implementation
supporting slf4j API.

Change-Id: I89e85cd3c76e954c3434622510975ce65dc227d4

2 years agoUpdate orbit to R20211213173813 23/188923/6
Matthias Sohn [Mon, 13 Dec 2021 23:07:10 +0000 (00:07 +0100)]
Update orbit to R20211213173813

and update
- com.google.gson to 2.8.8.v20211029-0838
- javaewah to 1.1.13.v20211029-0839
- net.i2p.crypto.eddsa to 0.3.0.v20210923-1401
- org.apache.ant to 1.10.12.v20211102-1452
- org.apache.commons.compress to 1.21.0.v20211103-2100
- org.bouncycastle.bcprov to 1.69.0.v20210923-1401
- org.junit to 4.13.2.v20211018-1956

Change-Id: I3ac39fc8a5df571d2e290241a03668f1e60880b4

2 years agoMerge branch 'stable-6.0' 08/189208/2
Matthias Sohn [Thu, 30 Dec 2021 23:33:30 +0000 (00:33 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: Icc38ce20c1c791c8cf0ca3dcab46b1151f122805

2 years agoMerge branch 'stable-5.13' into stable-6.0 07/189207/2
Matthias Sohn [Thu, 30 Dec 2021 23:30:51 +0000 (00:30 +0100)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: Iaff40b144aea9ad5e6d0fa6b448ad7d527992832

2 years agoMerge branch 'stable-5.12' into stable-5.13 06/189206/2
Matthias Sohn [Thu, 30 Dec 2021 23:29:40 +0000 (00:29 +0100)]
Merge branch 'stable-5.12' into stable-5.13

* stable-5.12:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I6a0266cbcaaf18d0d60f0abecb5434fd919c44b7

2 years agoMerge branch 'stable-5.11' into stable-5.12 05/189205/2
Matthias Sohn [Thu, 30 Dec 2021 23:28:53 +0000 (00:28 +0100)]
Merge branch 'stable-5.11' into stable-5.12

* stable-5.11:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I4e241860c2ca50750e22c2761c515c9895688c55

2 years agoMerge branch 'stable-5.10' into stable-5.11 04/189204/2
Matthias Sohn [Thu, 30 Dec 2021 23:26:24 +0000 (00:26 +0100)]
Merge branch 'stable-5.10' into stable-5.11

* stable-5.10:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: Ie3f2d05aeb1aa04af707cfafef5780349be4d981

2 years agoMerge branch 'stable-5.9' into stable-5.10 03/189203/2
Matthias Sohn [Thu, 30 Dec 2021 23:05:40 +0000 (00:05 +0100)]
Merge branch 'stable-5.9' into stable-5.10

* stable-5.9:
  Use FileSnapshot without using configs for FileBasedConfig

Change-Id: I4f954c48ad6e8ff18826fdc72d225bff3e3ae2d9