]> source.dussan.org Git - jgit.git/log
jgit.git
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 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 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 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

2 years agoMerge branch 'stable-5.8' into stable-5.9 02/189202/2
Matthias Sohn [Thu, 30 Dec 2021 22:58:41 +0000 (23:58 +0100)]
Merge branch 'stable-5.8' into stable-5.9

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

Change-Id: Ic97d38fc85daa00297abbfa186f83b779966e7ef

2 years agoMerge branch 'stable-5.7' into stable-5.8 01/189201/2 stable-5.8
Matthias Sohn [Thu, 30 Dec 2021 22:56:32 +0000 (23:56 +0100)]
Merge branch 'stable-5.7' into stable-5.8

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

Change-Id: If9cc2f2bae5dbead7a38218828da461540be942e

2 years agoMerge branch 'stable-5.6' into stable-5.7 00/189200/2 stable-5.7
Matthias Sohn [Thu, 30 Dec 2021 22:53:54 +0000 (23:53 +0100)]
Merge branch 'stable-5.6' into stable-5.7

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

Change-Id: I274d46d73cc896dcfde6e24c69c71f33aaa78d20

2 years agoMerge branch 'stable-5.5' into stable-5.6 99/189199/2 stable-5.6
Matthias Sohn [Thu, 30 Dec 2021 22:51:41 +0000 (23:51 +0100)]
Merge branch 'stable-5.5' into stable-5.6

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

Change-Id: If904289feecd1e0d8466c1fb998f160f14d54b61

2 years agoMerge branch 'stable-5.4' into stable-5.5 98/189198/2 stable-5.5
Matthias Sohn [Thu, 30 Dec 2021 22:41:54 +0000 (23:41 +0100)]
Merge branch 'stable-5.4' into stable-5.5

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

Change-Id: I84e11bdaa9306e23212dac9d8670557a18d40107

2 years agoMerge branch 'stable-5.3' into stable-5.4 97/189197/2 stable-5.4
Matthias Sohn [Thu, 30 Dec 2021 22:40:21 +0000 (23:40 +0100)]
Merge branch 'stable-5.3' into stable-5.4

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

Change-Id: I3d8eb2fa721e1a791db47a2342acc690ced01715

2 years agoMerge branch 'stable-5.2' into stable-5.3 96/189196/2 stable-5.3
Matthias Sohn [Thu, 30 Dec 2021 22:33:06 +0000 (23:33 +0100)]
Merge branch 'stable-5.2' into stable-5.3

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

Change-Id: Ib79c310c5b632e845ba69ce65e739ae0146103ca

2 years agoMerge branch 'stable-5.1' into stable-5.2 95/189195/2 stable-5.2
Matthias Sohn [Thu, 30 Dec 2021 22:18:21 +0000 (23:18 +0100)]
Merge branch 'stable-5.1' into stable-5.2

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

Change-Id: I17ede8876a0cf231c38cb9652c7bf51553b1e90e

2 years agoUse FileSnapshot without using configs for FileBasedConfig 76/189176/9 stable-5.1
Luca Milanesio [Tue, 28 Dec 2021 23:53:35 +0000 (23:53 +0000)]
Use FileSnapshot without using configs for FileBasedConfig

FileBasedConfig should not rely on auto-detection of
the file-snapshot attribute computation based on config.

The check was already performed when a new FileBasedConfig
is created at L158:

// don't use config in this snapshot to avoid endless recursion
newSnapshot = FileSnapshot.saveNoConfig(getFile());

The check was missing though when the FileBasedConfig is saved
to disk and the new snapshot is obtained from the associated
LockFile.

This change fixes the issue by keeping a non-config based
FileSnapshot also after a FileBasedConfig is saved.

Bug: 577983
Change-Id: Id1e410ba687e683ff2b2643af31e1110b103b356

2 years agoMerge branch 'stable-6.0' 49/189149/1
Thomas Wolf [Sun, 26 Dec 2021 15:05:17 +0000 (16:05 +0100)]
Merge branch 'stable-6.0'

* stable-6.0:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"
  TreeRevFilter: fix wrong stop when the given path disappears

Change-Id: Id7540d03991cdcf6f405e946b8cbbcc6a9696a31
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.13' into stable-6.0 48/189148/1
Thomas Wolf [Sun, 26 Dec 2021 15:03:40 +0000 (16:03 +0100)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"
  TreeRevFilter: fix wrong stop when the given path disappears

Change-Id: Ibd69e9d941ad9262b61dd0c4368e48cb82597a12
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.12' into stable-5.13 47/189147/1
Thomas Wolf [Sun, 26 Dec 2021 15:02:51 +0000 (16:02 +0100)]
Merge branch 'stable-5.12' into stable-5.13

* stable-5.12:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I6576872cc0f5dd452252fa6e4526086cdee65c28
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.11' into stable-5.12 46/189146/1
Thomas Wolf [Sun, 26 Dec 2021 15:02:06 +0000 (16:02 +0100)]
Merge branch 'stable-5.11' into stable-5.12

* stable-5.11:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ib80336a42e22da729b9db1e573772504cc0a3e77
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.10' into stable-5.11 45/189145/1
Thomas Wolf [Sun, 26 Dec 2021 15:01:08 +0000 (16:01 +0100)]
Merge branch 'stable-5.10' into stable-5.11

* stable-5.10:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I9e79ea2a0c554a184e4ce3b13e375eac8b7a4ac5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.9' into stable-5.10 44/189144/1
Thomas Wolf [Sun, 26 Dec 2021 14:58:49 +0000 (15:58 +0100)]
Merge branch 'stable-5.9' into stable-5.10

* stable-5.9:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I2a84c838a886d1d6383c34f50b418baa743c57b0
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.8' into stable-5.9 43/189143/1
Thomas Wolf [Sun, 26 Dec 2021 14:57:59 +0000 (15:57 +0100)]
Merge branch 'stable-5.8' into stable-5.9

* stable-5.8:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I88a629e571fec5a9820114ebf5765b5d94a276bd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.7' into stable-5.8 42/189142/1
Thomas Wolf [Sun, 26 Dec 2021 14:56:59 +0000 (15:56 +0100)]
Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ied786ab5e3c0dd05f701705fce2d4ad85502c4d6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.6' into stable-5.7 41/189141/1
Thomas Wolf [Sun, 26 Dec 2021 14:55:52 +0000 (15:55 +0100)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I454622dae6eb95aedbd858e3b12da72282d36673
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.5' into stable-5.6 40/189140/1
Thomas Wolf [Sun, 26 Dec 2021 14:54:37 +0000 (15:54 +0100)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I2622f1d384a88a556ba9d88f0d08a37af69e530c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.4' into stable-5.5 39/189139/1
Thomas Wolf [Sun, 26 Dec 2021 14:53:38 +0000 (15:53 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Ia1665dd92ccc3811a6116f41421a05aca10fc6eb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.3' into stable-5.4 38/189138/1
Thomas Wolf [Sun, 26 Dec 2021 14:52:23 +0000 (15:52 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I52a57a17abe60e30e3d7615f8cb4d0c5e6aebd9b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.2' into stable-5.3 37/189137/1
Thomas Wolf [Sun, 26 Dec 2021 14:51:23 +0000 (15:51 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: Id37f47a5ef2e3c8329eca30c171941f7e5606a85
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoMerge branch 'stable-5.1' into stable-5.2 36/189136/1
Thomas Wolf [Sun, 26 Dec 2021 14:49:06 +0000 (15:49 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

Change-Id: I625667c2718ab31ae7df907c3dd6024a933913b8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoRevert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation" 35/189135/1
Thomas Wolf [Sun, 26 Dec 2021 14:35:30 +0000 (15:35 +0100)]
Revert "RefDirectory.scanRef: Re-use file existence check done in snapshot creation"

This reverts commit f829f5f838e0f9c17373ea6cb3407976a8f395ff.

Using MISSING_FILEKEY as indicator for a non-existing file doesn't work
on Windows.

Bug: 577954
Change-Id: I92102a3d259f6cc0f367096a3213cfa794466817
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoTreeRevFilter: fix wrong stop when the given path disappears 38/188938/2
kylezhao [Fri, 12 Nov 2021 06:34:46 +0000 (14:34 +0800)]
TreeRevFilter: fix wrong stop when the given path disappears

When chgs[i] == adds[i], it indicated that a commit added some files
that pList[i] did not have, but didn't mean pList[i] is "empty tree
root".

Follow the example below:

.                           .
└── src                     └── src
    └── d1          ==>          └── d1
        └─ file1                    ├─  file1
                                    └── file2
   c.parents[i]                   c

The variable chg[i] equals to variable add[i],
but commit c.parents[i] is not "empty tree root".

We should add an additional check for no paths matching the filter.

Bug: 577227
Change-Id: I834e9ddd0de86b108b280a1139519ea962913b38
Signed-off-by: kylezhao <kylezhao@tencent.com>