]> source.dussan.org Git - jgit.git/log
jgit.git
4 years agoFix BadComparable error flagged by error prone 01/163401/4
David Ostrovsky [Fri, 22 May 2020 05:49:49 +0000 (07:49 +0200)]
Fix BadComparable error flagged by error prone

Running recent error prone version complaining on that code:

LfsPointer.java:171: error: [BadComparable] Possible sign flip from
narrowing conversion
return (int) (getSize() - o.getSize());
       ^
    (see https://errorprone.info/bugpattern/BadComparable)
  Did you mean 'return Long.compare(getSize(), o.getSize());'?

Bug: 562756
Change-Id: I0522f1025319a9290c448a064fbafdb4b16d1d59
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
4 years agoAdd tests for RawTextComparator.WS_IGNORE_CHANGE.hash() 94/163794/2
Thomas Wolf [Thu, 28 May 2020 17:40:01 +0000 (19:40 +0200)]
Add tests for RawTextComparator.WS_IGNORE_CHANGE.hash()

Change-Id: I1ed4df789094e09c39b3c2054fe5b9bd0c1a8f9b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoUpdate Orbit to R20200529191137 for final Eclipse release 2020-06 05/163905/2
Thomas Wolf [Sun, 31 May 2020 14:43:41 +0000 (16:43 +0200)]
Update Orbit to R20200529191137 for final Eclipse release 2020-06

This includes org.bouncycastle.bcprov 1.65.1 in the p2 repository.

Leave the maven and bazel dependencies for Bouncy Castle at 1.65.

Change-Id: I1fb39bd79e7339315f64f8b5dda89cb81dd035af
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoOrganize manifest of org.eclipse.jgit.pgm 10/163910/2
Matthias Sohn [Sun, 31 May 2020 21:33:09 +0000 (23:33 +0200)]
Organize manifest of org.eclipse.jgit.pgm

Use "organize manifest" to auto-cleanup the manifest of
org.eclipse.jgit.pgm. This removes some unused imports and unnecessary
manifest headers and updates use clauses.

Change-Id: Iacbd6d3b184c6fa8db28d9f06cbf56e57cc8ef5d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoDo not include log4j implementation in jgit 07/133407/8
Michael Keppler [Mon, 3 Dec 2018 16:25:51 +0000 (17:25 +0100)]
Do not include log4j implementation in jgit

As discussed in the bug, jgit should not include a logging
implementation, and instead rely on the product containing jgit to
configure the logging.

We have recently run into the situation, that installing egit in a (non
eclipse.org) RCP application breaks all the logging due to incompatible
logging implementations. Removal of the jgit logging implementation
should fix this.

Following further changes have been done for jgit command line:
* added log4j.properties to binary build of jgit.pgm. That file existed
in the git repository, but was not included in the eclipse binary build.
(maybe it is in the bazel build)
* removed apache.commons.logging package import from jgit.pgm. That
import is not used, and makes the logging even more confusing.

Bug: 514326
Change-Id: I6dc7d1462f0acfca9e2b1ac87e705617179ffdda
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoDecouple JSch from JGit Core 53/156153/29
Matthias Sohn [Fri, 24 Apr 2020 20:41:39 +0000 (22:41 +0200)]
Decouple JSch from JGit Core

Motivation: JSch serves as 'default' implementations of the SSH
transport. If a client application does not use it then there is no need
to pull in this dependency.

Move the classes depending on JSch to an OSGi fragment extending the
org.eclipse.jgit bundle and keep them in the same package as before
since moving them to another package would break API. Defer moving them
to a separate package to the next major release.

Add a new feature org.eclipse.jgit.ssh.jsch feature to enable
installation. With that users can now decide which of the ssh client
integrations (JCraft JSch or Apache Mina SSHD) they want to install.
We will remove the JCraft JSch integration in a later step due to the
reasons discussed in bug 520927.

Bug: 553625
Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2
Also-by: Michael Dardis <git@md-5.net>
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
4 years agoDecouple BouncyCastle from JGit Core 60/161560/17
Matthias Sohn [Sun, 26 Apr 2020 22:58:28 +0000 (00:58 +0200)]
Decouple BouncyCastle from JGit Core

Motivation: BouncyCastle serves as 'default' implementation of
the GPG Signer. If a client application does not use it there is no need
to pull in this dependency, especially since BouncyCastle is a large
library.

Move the classes depending on BouncyCastle to an OSGi fragment extending
the org.eclipse.jgit bundle. They are moved to a distinct internal
package in order to avoid split packages. This doesn't break public API
since these classes were already in an internal package before this
change.

Add a new feature org.eclipse.jgit.gpg.bc to enable installation. With
that users can now decide if they want to install it.

Attempts to sign a commit if org.eclipse.jgit.gpg.bc isn't available
will result in ServiceUnavailableException being thrown.

Bug: 559106
Change-Id: I42fd6c00002e17aa9a7be96ae434b538ea86ccf8
Also-by: Michael Dardis <git@md-5.net>
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
4 years agoVerify that the user home directory is valid 71/163871/2
Thomas Wolf [Fri, 29 May 2020 19:57:37 +0000 (21:57 +0200)]
Verify that the user home directory is valid

If the determination of the user home directory produces a Java File
object with an invalid path, spurious exceptions may occur at the
most inopportune moments anytime later. In the case in the linked bug
report, start-up of EGit failed, leading to numerous user-visible
problems in Eclipse.

So validate the return value of FS.userHomeImpl(). If converting that
File to a Path throws an exception, log the problem and fall back to
Java system property user.home. If that also is not valid, use null.

(A null user home directory is allowed by FS, and calling in Java
new File(null, "some_string") is fine and produces a File relative
to the current working directory.)

Bug: 563739
Change-Id: If9eec0f9a31a45bd815231706285c71b09f8cf56
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoWindowCache: conditional JMX setup 70/163870/1
Thomas Wolf [Fri, 29 May 2020 21:04:44 +0000 (23:04 +0200)]
WindowCache: conditional JMX setup

Make it possible to programmatically suppress the JMX bean
registration. In EGit it is not needed but can be rather costly
because it occurs during plug-in activation and accesses the
git user config.

Bug: 563740
Change-Id: I07ef7ae2f0208d177d2a03862846a8efe0191956
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge "RawTextComparator.WS_IGNORE_CHANGE must not compare whitespace"
Christian Halstrick [Thu, 28 May 2020 12:07:02 +0000 (08:07 -0400)]
Merge "RawTextComparator.WS_IGNORE_CHANGE must not compare whitespace"

4 years agoRawTextComparator.WS_IGNORE_CHANGE must not compare whitespace 73/163573/3
Thomas Wolf [Tue, 26 May 2020 06:50:33 +0000 (08:50 +0200)]
RawTextComparator.WS_IGNORE_CHANGE must not compare whitespace

Only the presence or absence of whitespace is significant; but not the
actual whitespace characters. Don't compare whitespace bytes.

Compare the C git implementation at [1].

[1] https://github.com/git/git/blob/0d0e1e8/xdiff/xutils.c#L173

Bug: 563570
Change-Id: I2d0522b637ba6b5c8b911b3376a9df5daa9d4c27
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoRevert "PackBitmapIndex: Not buffer inflated bitmap in BasePackBitmapIndex" 00/163700/1
Yunjie Li [Wed, 27 May 2020 17:29:20 +0000 (10:29 -0700)]
Revert "PackBitmapIndex: Not buffer inflated bitmap in BasePackBitmapIndex"

This reverts commit 3aee92478c2cbc67cd921533437b824e43ed9798, which
increased fetch latency significantly.

Change-Id: Id31a94dff83bf7ab2121718ead819bd08306a0b6
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoUpdate jetty to 9.4.28.v20200408 48/163648/1
Matthias Sohn [Tue, 26 May 2020 23:57:08 +0000 (01:57 +0200)]
Update jetty to 9.4.28.v20200408

Change-Id: I6fe26c1efcf812de3102ee82ce67f9e0bc3b0135
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd 4.16 staging target platform 42/163642/1
Matthias Sohn [Tue, 26 May 2020 21:36:05 +0000 (23:36 +0200)]
Add 4.16 staging target platform

* replace 4.15 staging by 4.15 release
* add 4.16 staging

Change-Id: I33cc701f0ea6fffeaec898fa50ef536b20102048
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoIn-memory SSH keys for the "no files" sshd tests 33/161533/3
Thomas Wolf [Sun, 26 Apr 2020 14:43:28 +0000 (16:43 +0200)]
In-memory SSH keys for the "no files" sshd tests

Avoid using a key written to a file. This makes it clearer that
the test does not rely on files being present.

Change-Id: I31cf4f404aab5b891c32fc4bda906b7f8fe03777
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoBuilder API to configure SshdSessionFactories 48/161448/4
Thomas Wolf [Thu, 23 Apr 2020 16:30:19 +0000 (18:30 +0200)]
Builder API to configure SshdSessionFactories

A builder API provides a more convenient way to define a customized
SshdSessionFactory by hiding the subclassing.

Also provide a new interface SshConfigStore to abstract away the
specifics of reading a ssh config file, and provide a way to customize
the concrete ssh config implementation to be used. This facilitates
using an alternate ssh config implementation that may or may not be
based on files.

Change-Id: Ib9038e8ff2a4eb3a9ce7b3554d1450befec8e1e1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoTransportHttp: abort on time-out or on SocketException 87/162987/3
Thomas Wolf [Wed, 13 May 2020 18:06:23 +0000 (20:06 +0200)]
TransportHttp: abort on time-out or on SocketException

Avoid trying other authentication methods on SocketException or on
InterruptedIOException. SocketException is rather fatal, such as
nothing listening on the peer's port, connection reset, or it could
be a connection time-out.

Time-outs enforced by Timeout{Input,Output}Stream may result in
InterruptedIOException being thrown.

In both cases, it makes no sense to try other authentication methods,
and doing so may wrongly report "authentication not supported" or
"cannot open git-upload-pack" or some such instead of reporting a
time-out.

Bug: 563138
Change-Id: I0191b1e784c2471035e550205abd06ec9934fd00
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge "Bazel: Remove superfluous dependencies flagged by unused_deps"
David Pursehouse [Sat, 23 May 2020 07:36:35 +0000 (03:36 -0400)]
Merge "Bazel: Remove superfluous dependencies flagged by unused_deps"

4 years agoIgnore core.eol if core.autocrlf=input 22/160622/2
Thomas Wolf [Tue, 7 Apr 2020 22:07:47 +0000 (00:07 +0200)]
Ignore core.eol if core.autocrlf=input

Config core.eol is to be ignored if core.autocrlf is true or input.[1]
JGit didn't do so when core.autocrlf=input was set.

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreeol

Bug: 561877
Change-Id: I5e62e0510d160b5113c1090319af09c2bc1bcb59
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoAttributes: fix handling of text=auto in combination with eol 04/159904/4
Thomas Wolf [Mon, 23 Mar 2020 15:55:35 +0000 (16:55 +0100)]
Attributes: fix handling of text=auto in combination with eol

In Git 2.10.0 the interpretation of gitattributes changed or was fixed
such that "* text=auto eol=crlf" would indeed still do auto-detection
of text vs. binary content.[1] Previously this was identical to
"* text eol=crlf", i.e., treating all files as text.

JGit still did the latter, which caused surprises because it changed
binary files.

[1] https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248

Bug: 561341
Change-Id: I5b6fb97b5e86fd950a98537b6b8574f768ae30e5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoBazel: Remove superfluous dependencies flagged by unused_deps 51/150651/4
David Ostrovsky [Sun, 6 Oct 2019 13:28:44 +0000 (15:28 +0200)]
Bazel: Remove superfluous dependencies flagged by unused_deps

Bazel buildtools project includes in addition to buildifier also unused
deps and buildozer utilities, that detect unused dependencies and fix
them by applying the removal to the build files. This change is created
by installing unused_deps from buildtools@HEAD and running:

  $ unused_deps //...

and applying the suggested modifications.

Change-Id: Iad74ec2fa719475b29391586f40b13ae30477004
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
4 years agoLog stack trace if CachingKeyPairProvider hits unexpected exception 21/163321/1
Matthias Sohn [Wed, 20 May 2020 14:13:40 +0000 (16:13 +0200)]
Log stack trace if CachingKeyPairProvider hits unexpected exception

Log the stack trace in order to help understanding the bug 563380

Bug: 563380
Change-Id: If993a63ccec5042b10e1d5e945b18f4b5f06d8ff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate Orbit to S20200519202422 and ant to 1.10.8 81/163281/2
Matthias Sohn [Wed, 20 May 2020 00:56:44 +0000 (02:56 +0200)]
Update Orbit to S20200519202422 and ant to 1.10.8

Change-Id: I5bc120a495deb2f3b29bd04bb1c9a2058394ba8a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoInclude full IssuerFingerprint in GPG signature 62/161962/4
Thomas Wolf [Mon, 4 May 2020 09:38:46 +0000 (11:38 +0200)]
Include full IssuerFingerprint in GPG signature

Update dependency to Bouncy Castle to 1.65.

Add the IssuerFingerprint as a hashed sub-packet in the signature. If
added unhashed, GPG ignores it.

Bug: 553206
Change-Id: I6807e8e2385e6ec5790f388e4753a44aa9474ebb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoBazel: Fix src_sha1 of bcpg-jdk15on 59/163159/2
David Pursehouse [Mon, 18 May 2020 01:25:13 +0000 (10:25 +0900)]
Bazel: Fix src_sha1 of bcpg-jdk15on

Test plan:

  bazel build //...

Change-Id: Ibf1d0b56785d62150bbae49b553c856efbe6d197
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoSuppress API error for new method BitmapIndex.Bitmap#retrieveCompressed 58/163158/1
Matthias Sohn [Sun, 17 May 2020 21:11:31 +0000 (23:11 +0200)]
Suppress API error for new method BitmapIndex.Bitmap#retrieveCompressed

OSGi semantic versioning allows breaking implementers in a minor
release.

Change-Id: Ib55dc43dd3b50b0ef39a7094190f230210aee4b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoFix wrong @since tags added in dcb0265 57/163157/1
Matthias Sohn [Sun, 17 May 2020 21:08:27 +0000 (23:08 +0200)]
Fix wrong @since tags added in dcb0265

This change was introduced in 5.8.

Change-Id: Ic74ebff5a0547bb55e0401b38f73ebc6e67cace9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge changes I39783eee,I874503ec,Ic942a8e4,I6ec2c3e8,I62cb5030, ...
Terry Parker [Wed, 13 May 2020 20:34:23 +0000 (16:34 -0400)]
Merge changes I39783eee,I874503ec,Ic942a8e4,I6ec2c3e8,I62cb5030, ...

* changes:
  PackBitmapIndex: Set distance threshold
  PackBitmapIndex: Not buffer inflated bitmap in BasePackBitmapIndex
  PackBitmapIndex: Remove convertedBitmaps in the Remapper
  PackBitmapIndex: Reduce memory usage in GC
  PackBitmapIndex: Add AddToBitmapWithCacheFilter class
  PackBitmapIndex: Add util methods and builder to BitmapCommit
  PackBitmapIndex: Move BitmapCommit to a top-level class
  Refactor: Make retriveCompressed an method of the Bitmap class

4 years agoPackBitmapIndex: Set distance threshold 82/161782/5
Yunjie Li [Wed, 29 Apr 2020 22:27:47 +0000 (15:27 -0700)]
PackBitmapIndex: Set distance threshold

Setting the distance threshold to 2000 in PackWriterBitmapPreparer to
reduce memory usage in garbage collection. When the threshold is 0, GC
for the msm repository would use about 37 GB memory to complete. After
setting it to 2000, GC can finish in 75 min with about 10 GB memory.

Change-Id: I39783eeecbae58261c883735499e61ee1cac75fe
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Not buffer inflated bitmap in BasePackBitmapIndex 56/161456/8
Yunjie Li [Thu, 23 Apr 2020 22:12:15 +0000 (15:12 -0700)]
PackBitmapIndex: Not buffer inflated bitmap in BasePackBitmapIndex

Currently we're buffering the inflated bitmap entry in BasePackBitmapIndex
to optimize running time. However, this will use lots of memory during
the construction of the pack bitmap index file which may cause failure of
garbage collection.

The running time didn't increase significantly, if there's any increase,
after removing the buffering here. The report about usage of time/memory
will come in the next commit.

Change-Id: I874503ecc85714acab7ca62a6a7968c2dc0b56b3
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Remove convertedBitmaps in the Remapper 55/161455/8
Yunjie Li [Thu, 23 Apr 2020 22:11:14 +0000 (15:11 -0700)]
PackBitmapIndex: Remove convertedBitmaps in the Remapper

The convertedBitmaps serves for time-optimization purpose. But it's
actually not saving time much but using lots of memory. So remove the
field here to save memory.

Currently the remapper class is only used in the construction of the
bitmap index file. And during the preparation of the file, we're only
getting bitmaps from the remapper when finding objects accessible from
a commit, so bitmap associated with each commit will only be fetched once
and thus the convertedBitmaps would hardly be read, which means that it's
not saving time.

Change-Id: Ic942a8e485135fb177ec21d09282d08ca6646fdb
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Reduce memory usage in GC 25/157525/14
Yunjie Li [Tue, 11 Feb 2020 19:06:33 +0000 (11:06 -0800)]
PackBitmapIndex: Reduce memory usage in GC

Currently, the garbage collection is consistently failing for some large
repositories in the building bitmap phase, e.g.Linux-MSM project:
https://source.codeaurora.org/quic/la/kernel/msm-3.18

Historically, bitmap index creation happened in 3 phases:
1. Select the commits to which bitmaps should be attached.
2. Create all bitmaps for these commits, stored in uncompressed format
in the PackBitmapIndexBuilder.
3. Deltify the bitmaps and write them to disk.

We investigated the process. For phase 2 it's most efficient to create
bitmaps starting with oldest commit and moving to the newest commit,
because the newer commits are able to reuse the work for the old ones.
But for bitmap deltification in phase 3, it's better when a newer
commit's bitmap is the base, and the current disk format writes bitmaps
out for the newest commits first.

This change introduces a new collection to hold the deltified and
compressed representations of the bitmaps, keeping a smaller subset of
commits in the PackBitmapIndexBuilder to help make the bitmap index
creation more memory efficient.

And in this commit, we're setting DISTANCE_THRESHOLD to 0 in the
PackWriterBitmapPreparer, which means the garbage collection will not
have much behavoir change and will still use as much memory as before.

Change-Id: I6ec2c3e8dde11805af47874d67d33cf1ef83660e
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Add AddToBitmapWithCacheFilter class 24/157524/10
Yunjie Li [Tue, 11 Feb 2020 01:02:13 +0000 (17:02 -0800)]
PackBitmapIndex: Add AddToBitmapWithCacheFilter class

Add a new revwalk filter, AddToBitmapWithCachedFilter. This filter updates
a client-provided {@code BitmapBuilder} as a side effect of a revwalk.
Similar to {@code AddToBitmapFilter}, it short circuits the walk when it
encounters a commit which is included in the provided bitmap's BitmapIndex.
It also short circuits the walk if it encounters the client-provided
cached commit.

Change-Id: I62cb503016f4d3995d648d92b82baab7f93549a9
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Add util methods and builder to BitmapCommit 53/161453/9
Yunjie Li [Wed, 22 Apr 2020 20:17:47 +0000 (13:17 -0700)]
PackBitmapIndex: Add util methods and builder to BitmapCommit

Add some utility methods and a builder class for BitmapCommit class in
preparation for improving the memory footprint of GC's bitmap generation
phase.

Change-Id: Ice3d257fc26f3917a65a64eaf53b508b89043caa
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoPackBitmapIndex: Move BitmapCommit to a top-level class 23/157523/9
Yunjie Li [Wed, 22 Apr 2020 20:12:05 +0000 (13:12 -0700)]
PackBitmapIndex: Move BitmapCommit to a top-level class

Move BitmapCommit from inside the PackWriterBitmapPreparer to a new
top-level class in preparation for improving the memory footprint of GC's
bitmap generation phase.

Change-Id: I4d404a5b3a34998b441d23105197f33d32d39670
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoRefactor: Make retriveCompressed an method of the Bitmap class 22/157522/7
Yunjie Li [Mon, 10 Feb 2020 23:22:31 +0000 (15:22 -0800)]
Refactor: Make retriveCompressed an method of the Bitmap class

Make retrieveCompressed() a method of Bitmap interface to avoid type
casting and later reuse in improving the memory footprint of GC's bitmap
generation phase.

Change-Id: I098d85105cf17af845d43b8c71b4ca48b02fd7da
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoFix downloading LFS Object fails behind proxy 91/162791/2
Matthias Sohn [Mon, 11 May 2020 08:36:54 +0000 (10:36 +0200)]
Fix downloading LFS Object fails behind proxy

When downloading LFS objects also accept response code 203 as successful
download. This response may be seen when downloading via a proxy.

Bug: 563022
Change-Id: Iee85fdb451b33369d08859872e5bfc2a67dffa6d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge changes I6543c2e1,I21ed029d
Terry Parker [Mon, 11 May 2020 21:40:20 +0000 (17:40 -0400)]
Merge changes I6543c2e1,I21ed029d

* changes:
  ReceivePack: adding IterativeConnectivityChecker
  Moving transport/internal -> internal/transport

4 years agoAllow for using custom s3 host with lfs server 70/162070/2
Pat Long [Thu, 23 Apr 2020 17:52:22 +0000 (13:52 -0400)]
Allow for using custom s3 host with lfs server

By default, it will generate hostname using the aws region passed to the
constructor.

This will allow for easier testing, since you can just spin up a local
minio (or other s3-compatible storage service) instance and point the
application at that for the storage mechanism.

It will also allow for storing lfs objects on-prem.

Change-Id: I2566b1fcce58f3d306ddd23a8da702ef5a451c7b
Signed-off-by: Pat Long <pllong@arista.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoReceivePack: adding IterativeConnectivityChecker 97/153097/24
Demetr Starshov [Thu, 7 May 2020 00:53:36 +0000 (17:53 -0700)]
ReceivePack: adding IterativeConnectivityChecker

Introduce an IterativeConnectivityChecker which runs a connectivity
check with a filtered set of references, and falls back to using the
full set of advertised references.

It uses references during first check attempt:
- References that are ancestors of an incoming commits (e.g., pushing
a commit onto an existing branch or pushing a new branch based on
another branch)
- Additional list of references we know client can be interested in
(e.g. list of open changes for Gerrit)

We tested it inside Google and it improves connectivity for certain
topologies. For example connectivity counts for
chromium.googlesource.com/chromium/src:

percentile_50: 1923 (was: 22777)
percentile_90: 23272 (was: 353003)
percentile_99: 345522 (was: 353435)

This saved ~2 seconds on every push to this repository.

Signed-off-by: Demetr Starshov <dstarshov@google.com>
Change-Id: I6543c2e10ed04622ca795b195665133e690d3b10

4 years agoMoving transport/internal -> internal/transport 09/162609/2
Demetr Starshov [Thu, 7 May 2020 00:36:34 +0000 (17:36 -0700)]
Moving transport/internal -> internal/transport

Moving transport related internal classes into dedicated subpackage in
o/e/j/internal package.

Signed-off-by: Demetr Starshov <dstarshov@google.com>
Change-Id: I21ed029d359f5f7d8298f102efbb4b1dcdf404ad

4 years agoFix error occurring during checkout 24/162624/2
Nail Samatov [Thu, 7 May 2020 09:03:56 +0000 (12:03 +0300)]
Fix error occurring during checkout

Fix NullPointerException occurring when calling
CheckoutCommand with forced == true option when
the branch isn't changed and there is deleted
uncommitted file.

Change-Id: I99bf1fc25e6889f07092320d7bc2772ec5d341b5
Signed-off-by: Nail Samatov <sanail@yandex.ru>
4 years agoMerge branch 'stable-5.8' 01/162601/1
Matthias Sohn [Wed, 6 May 2020 22:33:49 +0000 (00:33 +0200)]
Merge branch 'stable-5.8'

* stable-5.8:
  Prepare 5.8.0-SNAPSHOT builds
  JGit v5.8.0.202005061305-m2

Change-Id: I7e95ddbedfae23035cc132abdf574545ffcda091

4 years agoPrepare 5.8.0-SNAPSHOT builds 98/162598/1
Matthias Sohn [Wed, 6 May 2020 22:14:46 +0000 (00:14 +0200)]
Prepare 5.8.0-SNAPSHOT builds

Change-Id: Ic7d763b3b02b4d2a7a4141d2d9d715855dd69918
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.8.0.202005061305-m2 77/162577/1 v5.8.0.202005061305-m2
Matthias Sohn [Wed, 6 May 2020 17:06:11 +0000 (19:06 +0200)]
JGit v5.8.0.202005061305-m2

Change-Id: I9d9e5a9e000a74513896744cc3646430cb872893
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate to bouncycastle 1.65 and orbit I20200506000552 70/162570/3
Matthias Sohn [Wed, 6 May 2020 14:33:46 +0000 (16:33 +0200)]
Update to bouncycastle 1.65 and orbit I20200506000552

Bug: 553206
Change-Id: I867bbe88b847bf6d17f17f6cf8c565cd4a2437cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoApplyCommand: use Files#copy to copy file 32/162532/3
Matthias Sohn [Wed, 6 May 2020 07:36:52 +0000 (09:36 +0200)]
ApplyCommand: use Files#copy to copy file

This should be faster.

Change-Id: I404ec5e66731b3cf7a8e621cf1ff8748d109ea69
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoApply hunks when renaming or copying from patch files 49/161149/7
Jack Wickham [Wed, 25 Mar 2020 17:58:54 +0000 (17:58 +0000)]
Apply hunks when renaming or copying from patch files

When applying a patch that contains renames or copies using ApplyCommand,
also apply all hunks that apply to the renamed or copied file.

Change-Id: I9f3fa4370458bd7c14beeb2e2b49e846d70203cb
Signed-off-by: Jack Wickham <jwickham@palantir.com>
4 years agoCreate parent directories when renaming a file in ApplyCommand 56/161156/5
Jack Wickham [Fri, 17 Apr 2020 17:33:39 +0000 (18:33 +0100)]
Create parent directories when renaming a file in ApplyCommand

Before this change, applying a patch will fail if the destination directory
doesn't exist; after, the necessary parent directories are created.

If renaming the file fails, the directories won't be deleted, so this change
isn't atomic. However, ApplyCommand is already not atomic - if one hunk fails
to apply, other hunks still get applied - so I don't think that is a blocker.

Change-Id: Iea36138b806d4e7012176615bcc673756a82f365
Signed-off-by: Jack Wickham <jwickham@palantir.com>
4 years agoReduce BitmappedObjectReachabilityChecker visibility 02/162002/2
Ivan Frade [Mon, 4 May 2020 18:41:19 +0000 (11:41 -0700)]
Reduce BitmappedObjectReachabilityChecker visibility

ObjectReachabilityChecker interface is the only public API. The
implementation is instantiated by ObjectWalk and doesn't need to be
visible outside the package.

Change-Id: I5b97bb98990cded637686bdc15c9655330b7780f
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoAdd missing @since to new API 61/161961/1
Thomas Wolf [Mon, 4 May 2020 07:30:24 +0000 (09:30 +0200)]
Add missing @since to new API

Change-Id: Ie7c3481aba515d9c9b0a152db17b5a9dc74e7ede
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoAdd missing test source file to the build 52/161952/1
David Ostrovsky [Sun, 3 May 2020 21:20:03 +0000 (23:20 +0200)]
Add missing test source file to the build

Change-Id: I020ff281eaa49794aeb1853711485bc8c7047dd8
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
4 years agoUpgrade Tycho to 1.7.0 60/161860/1
Michael Keppler [Fri, 1 May 2020 08:34:22 +0000 (10:34 +0200)]
Upgrade Tycho to 1.7.0

Change-Id: I41d927e53f040750bbf0160dc15d8ca8a3f9f7ca
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
4 years agoObjectReachabilityCheckers: Make walk member final 35/161835/1
Ivan Frade [Thu, 30 Apr 2020 17:21:42 +0000 (10:21 -0700)]
ObjectReachabilityCheckers: Make walk member final

It is only assigned on initialization.

Change-Id: I36f68b3f511236e66cc7a4f56ba49252b317276a
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoUpgrade wagon-ssh to 3.4.0 08/161608/5
David Pursehouse [Mon, 27 Apr 2020 23:18:38 +0000 (08:18 +0900)]
Upgrade wagon-ssh to 3.4.0

Change-Id: Id9a1bf7fcdba7c011ccff54188dfb1bef8bf8a4b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.7' 79/161779/1
Matthias Sohn [Wed, 29 Apr 2020 21:22:39 +0000 (23:22 +0200)]
Merge branch 'stable-5.7'

* stable-5.7:
  Bump Bazel version to 3.1.0

Change-Id: I108815577a5aab605891496c17d6f225d35f7346
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.6' into stable-5.7 78/161778/1
Matthias Sohn [Wed, 29 Apr 2020 21:21:50 +0000 (23:21 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Bump Bazel version to 3.1.0

Change-Id: I8a9f39370ab506d9ff5763ed2d05f0d970bbd10b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUploadPack: Use more relevant refs first in object reachability check 60/160560/4
Ivan Frade [Mon, 6 Apr 2020 21:35:52 +0000 (14:35 -0700)]
UploadPack: Use more relevant refs first in object reachability check

The bitmap-bassed object reachability checker, tries to find the objects
in the first starter, then adding the second starter... and so on. This
rewards passing the most popular refs first.

Order the refs with heads first, then tags, then others (e.g. changes)
for the object reachability checker. Using streams, delay also the
resolution of the ref to RevObject until necessary.

Change-Id: I9414b76754d7c0ffee1e2eeed6939895c8e92cbe
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoUploadPack: Refactor to generalize the object reachability checks 59/160559/4
Ivan Frade [Sat, 4 Apr 2020 06:27:33 +0000 (23:27 -0700)]
UploadPack: Refactor to generalize the object reachability checks

ObjectWalk#createObjectReachabilityChecker() returns the best
implementation for the repo. UploadPack can use the interface and fold
the with/without commits cases in one code path.

Change-Id: I857c11735d1d8e36c3ed8185ff11de8a62e86540
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoUploadPack: Use BitmappedReachabilityChecker for not advertised wants 58/160558/4
Ivan Frade [Sat, 4 Apr 2020 06:20:27 +0000 (23:20 -0700)]
UploadPack: Use BitmappedReachabilityChecker for not advertised wants

Change-Id: Ifea971d5c0309e28a909441ee8a6f1e62397d6d3
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agorevwalk: Introduce bitmap-based object reachability checker 57/160557/4
Ivan Frade [Sat, 4 Apr 2020 05:04:15 +0000 (22:04 -0700)]
revwalk: Introduce bitmap-based object reachability checker

Change-Id: I0b1a2bd21f98894862aab339f8c2e4a417897b89
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoBump Bazel version to 3.1.0 99/161699/1
David Pursehouse [Wed, 29 Apr 2020 04:53:45 +0000 (13:53 +0900)]
Bump Bazel version to 3.1.0

Change-Id: Id58d1603846a88be3493165583adca481c026eed
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agorevwalk: Extract ObjectReachabilityChecker interface 56/160556/3
Ivan Frade [Sat, 4 Apr 2020 04:48:34 +0000 (21:48 -0700)]
revwalk: Extract ObjectReachabilityChecker interface

Extract ObjectReachabilityChecker interface from the walk-based
implementation, to add a bitmapped based implementation later.

Refactor the test case to use it for both implementations.

Change-Id: Iaac7c6b037723811956ac22625f27d3b4d742139
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoUploadPack: Extract walk-based reachability check 55/160555/3
Ivan Frade [Thu, 2 Apr 2020 05:10:09 +0000 (22:10 -0700)]
UploadPack: Extract walk-based reachability check

Preparing the code to optimize the bitmap-based object reachability
checker.  We are mirroring first the commit reachability checker
structure (interface + 2 implementations).

Move the walk-base reachability checker to its own class.

This class is public at the moment. Later ObjectWalk will return an
interface and this implementation will be package-private.

Change-Id: Ifac70094e1af137291c3607d95e689992f814b26
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoEnable passing java options to jgit command line executable 33/161633/3
Matthias Sohn [Tue, 28 Apr 2020 06:41:34 +0000 (08:41 +0200)]
Enable passing java options to jgit command line executable

This allows to pass java options to the jgit command line executable
by setting the environment variable "java_args", e.g.

$ java_args="-Xmx8g" jgit log

Change-Id: Ic7271b104737a8306d9db0f1895079b9f7bb7fd0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRefTreeBatch: fix unclosed resource warning 32/161632/1
Matthias Sohn [Mon, 27 Apr 2020 13:15:11 +0000 (15:15 +0200)]
RefTreeBatch: fix unclosed resource warning

Change-Id: I7d630d11d3ef2ff2b74ec7a7018760b7b4931ad2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoCherryPickCommand: fix unclosed resource warning 31/161631/1
Matthias Sohn [Mon, 27 Apr 2020 13:14:52 +0000 (15:14 +0200)]
CherryPickCommand: fix unclosed resource warning

Change-Id: I2dc76efd16d887048a5cb4af2b2d8e6faa4f22cd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoURIish: suppress non-localized message warning 78/161578/2
Matthias Sohn [Mon, 27 Apr 2020 13:11:52 +0000 (15:11 +0200)]
URIish: suppress non-localized message warning

Change-Id: I3ec37c67ba6f00ad8bf396aa3261dd90f35789ea
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAlways use https to access download.eclipse.org 73/161573/1
Matthias Sohn [Mon, 27 Apr 2020 12:52:04 +0000 (14:52 +0200)]
Always use https to access download.eclipse.org

Change-Id: Ida3cd74dc80020308496f53bdda3676b616953d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUploadPack: Clear advertised ref map after negotiation 41/161341/3
Minh Thai [Wed, 22 Apr 2020 04:17:58 +0000 (21:17 -0700)]
UploadPack: Clear advertised ref map after negotiation

After negotiation phase of a fetch, the advertised ref map is no longer used and
can be safely cleared. For >1GiB repos object selection and packfile writing may
take 10s of minutes. For the chromium.googlesource.com/chromium/src repo, this
advertised ref map is >400MiB. Returning this memory to the Java heap is a major
scalability win.

Change-Id: I00d453c5ef47630c21f199e333e1cfcf47b7e92a
Signed-off-by: Minh Thai <mthai@google.com>
4 years agoUse Map directly in MetaFilter 73/161373/1
Lars Vogel [Wed, 22 Apr 2020 12:37:20 +0000 (14:37 +0200)]
Use Map directly in MetaFilter

Change-Id: I15545e9c7cdcbb8a913cbcf0eef7f8a2281de7a8
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
4 years agoFix human name for local .bundle files 50/161250/4
Konrad Windszus [Mon, 20 Apr 2020 19:43:12 +0000 (21:43 +0200)]
Fix human name for local .bundle files

Bug: 560903
Change-Id: I15d45330398cc573940265d16a2db29ddce085aa
Signed-off-by: Konrad Windszus <konrad_w@gmx.de>
4 years agoMerge branch 'stable-5.7' 79/161179/1
Matthias Sohn [Sat, 18 Apr 2020 17:08:01 +0000 (19:08 +0200)]
Merge branch 'stable-5.7'

* stable-5.7:
  Bazel: Disable SecurityManagerMissingPermissionsTest test

Change-Id: Id8665d1ba630c1359e86846548143a785b178e75
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoBazel: Disable SecurityManagerMissingPermissionsTest test 64/161164/5
David Ostrovsky [Fri, 17 Apr 2020 22:00:32 +0000 (00:00 +0200)]
Bazel: Disable SecurityManagerMissingPermissionsTest test

In Id5376f09f0d a test with dependency on log4j library was added, but
the library was missed to be added to the Bazel build tool chain.

Given that Bazel test runner doesn't suport custom security manager the
test wouldn't pass even if the missing dependency would be added. The
only solution we have for now is to exclude that test from Bazel tool
chain.

Filed a feature request for bazel to support such tests at
https://github.com/bazelbuild/bazel/issues/11146

Bug: 562274
Change-Id: I873a0e09addc583455b68122f66cd3952e485f0e
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.7' 66/161166/1
Matthias Sohn [Fri, 17 Apr 2020 22:40:57 +0000 (00:40 +0200)]
Merge branch 'stable-5.7'

* stable-5.7:
  Remove double blank from sentence start
  Bump Bazel version to 3.0.0
  Scan through all merged reftables for max/min update indices

Change-Id: Idee792c6e65ca3fb283dba850f17d6554aaa1fa7

4 years agoMerge branch 'stable-5.6' into stable-5.7 65/161165/1
Matthias Sohn [Fri, 17 Apr 2020 22:30:15 +0000 (00:30 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Remove double blank from sentence start
  Bump Bazel version to 3.0.0

Change-Id: I26c3a8345020239d1c2ec5c6f70a633b43ddab86

4 years agoRemove double blank from sentence start 14/161114/1
Michael Keppler [Tue, 14 Apr 2020 07:31:50 +0000 (09:31 +0200)]
Remove double blank from sentence start

Multiple whitespaces are not normalized when reading properties files,
therefore leading to unwanted space/indentation in console or UI output.

Change-Id: I1f5224fe359e0cac493e0237872afc75dc8b9fbe
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
(cherry picked from commit ebbc3efce73278d6e0dbb1acd099db2446b1bed9)

4 years agoUpgrade maven-antrun-plugin to 3.0.0 50/161050/1
David Pursehouse [Thu, 16 Apr 2020 11:15:23 +0000 (20:15 +0900)]
Upgrade maven-antrun-plugin to 3.0.0

Change-Id: I79d55d1c0b30cddfcc6a188af87ea08d802c4c3c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade maven-shade-plugin to 3.2.3 88/160888/2
David Pursehouse [Tue, 14 Apr 2020 09:33:46 +0000 (18:33 +0900)]
Upgrade maven-shade-plugin to 3.2.3

Change-Id: Idf84a1a22b250484db5d03cf55c5207be37511b9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoRemove double blank from sentence start 75/160875/1
Michael Keppler [Tue, 14 Apr 2020 07:31:50 +0000 (09:31 +0200)]
Remove double blank from sentence start

Multiple whitespaces are not normalized when reading properties files,
therefore leading to unwanted space/indentation in console or UI output.

Change-Id: I1f5224fe359e0cac493e0237872afc75dc8b9fbe
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
4 years agoBump Bazel version to 3.0.0 67/160567/1
David Pursehouse [Tue, 7 Apr 2020 07:11:42 +0000 (16:11 +0900)]
Bump Bazel version to 3.0.0

Change-Id: I3866b58d3d288f37b1818be5b56d05e8be6ecb0f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge "ReceivePack: Use error message if set"
Terry Parker [Mon, 6 Apr 2020 15:20:46 +0000 (11:20 -0400)]
Merge "ReceivePack: Use error message if set"

4 years agoScan through all merged reftables for max/min update indices 20/159920/2
Minh Thai [Fri, 20 Mar 2020 06:10:41 +0000 (23:10 -0700)]
Scan through all merged reftables for max/min update indices

Since reftables might have update index ranges that are overlapped.

Change-Id: I8f8215b99a0a978d4dd0155dbaf33e5e06ea8202
Signed-off-by: Minh Thai <mthai@google.com>
(cherry picked from commit 06748c205c44bb4eaf6015387112de97f566c6a2)

4 years agoFileUtils: improve delete (Windows) 10/159310/5
Alexander Nittka [Fri, 13 Mar 2020 13:16:50 +0000 (14:16 +0100)]
FileUtils: improve delete (Windows)

Ensure files are writable before trying to delete them.

Bug: 408846
Change-Id: I930a547594bba853c33634ae54bd64d236afade3
Signed-off-by: Alexander Nittka <alex@nittka.de>
4 years agoMerge branch 'stable-5.7' 23/160423/1
Thomas Wolf [Fri, 3 Apr 2020 08:39:37 +0000 (10:39 +0200)]
Merge branch 'stable-5.7'

* stable-5.7:
  FS.runInShell(): handle quoted filters and hooksPath containing blanks
  Handle non-normalized index also for executable files
  Prepare 5.7.1-SNAPSHOT builds
  JGit v5.7.0.202003110725-r

Change-Id: I8a8580e44bfa05989d476cf22a029abd4fd407c6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge branch 'stable-5.6' into stable-5.7 22/160422/1
Thomas Wolf [Fri, 3 Apr 2020 08:18:10 +0000 (10:18 +0200)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  FS.runInShell(): handle quoted filters and hooksPath containing blanks
  Handle non-normalized index also for executable files

Change-Id: I240377e87c073ee7a621a88e39fc319c59fa037a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoFS.runInShell(): handle quoted filters and hooksPath containing blanks 05/160405/2
Thomas Wolf [Thu, 2 Apr 2020 19:15:18 +0000 (21:15 +0200)]
FS.runInShell(): handle quoted filters and hooksPath containing blanks

Revert commit 2323d7a. Using $0 in the shell command call results in
the command string being taken literally. That was introduced to fix
a problem with backslashes, but is actually not correct.

First, the problem with backslashes occurred only on Win32/Cygwin,
and has been properly fixed in commit 6f268f8.

Second, this is used only for hooks (which don't have backslashes in
their names) and filter commands from the git config, where the user
is responsible for properly quoting or escaping such that the commands
work.

Third, using $0 actually breaks correctly quoted filter commands
like in the bug report. The shell really takes the command literally,
and then doesn't find the command because of quotes.

So revert this change.

At the same time there's a related problem with hooks. If the path to
the hook contains blanks, runInShell() would also fail to find the
hook. In this case, the command doesn't come from user input but is
just a Java File object with an absolute path containing blanks. (Can
occur if core.hooksPath points to such a path with blanks, or if the
repository has such a path.)

The path to the hook as obtained from the file system must be quoted.

Add a test for a hook path with a blank.

This reverts commit 2323d7a1ef909f9deb3f21329cf30bd1173ee9cf.

Bug: 561666
Change-Id: I4d7df13e6c9b245fe1706e191e4316685a8a9d59
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoDocument gc and pack relevant options 14/160014/5
Matthias Sohn [Wed, 25 Mar 2020 22:50:44 +0000 (23:50 +0100)]
Document gc and pack relevant options

Change-Id: Iab7262b25942fa8c062b979d394674635b70a284
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoDefine constants for pack config option keys 53/160153/3
Matthias Sohn [Sun, 29 Mar 2020 11:08:26 +0000 (13:08 +0200)]
Define constants for pack config option keys

Change-Id: Ifb8227cb62370029d6774f2a22b15d6478c713ca
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoFix javadoc typo 59/160359/1
Karsten Thoms [Thu, 2 Apr 2020 08:54:43 +0000 (10:54 +0200)]
Fix javadoc typo

Bug: 499934
Change-Id: I0d6ee56fad4472972f69cc1e7cb2a727e95ab6b4
Signed-off-by: Karsten Thoms <karsten.thoms@karakun.com>
4 years agoUpgrade ecj to 3.21.0 22/160122/1
David Pursehouse [Sat, 28 Mar 2020 03:41:34 +0000 (12:41 +0900)]
Upgrade ecj to 3.21.0

Change-Id: Id337a320a59a77c36866f668ea1e30780bb55f35
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoReceivePack: Use error message if set 69/159969/4
Masaya Suzuki [Tue, 24 Mar 2020 18:50:34 +0000 (11:50 -0700)]
ReceivePack: Use error message if set

ReceiveCommand can have an error message. This is shown only for some
cases even if it's set. This change uses the error message if it's set,
and fallback to the default message if unset.

Change-Id: I8d906e71ad08cf49bcdb28caea8fcc66798c68ff
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
4 years agoHandle non-normalized index also for executable files 80/159980/1
Thomas Wolf [Wed, 25 Mar 2020 08:13:20 +0000 (09:13 +0100)]
Handle non-normalized index also for executable files

Commit 60cf85a4 corrected the handling of check-in for files where
the index version is non-normalized, i.e., contains CR-LF line endings.
However, it did so only for regular files, not executable files.

Bug: 561438
Change-Id: I372cc990c5efeb00315460f36459c0652d5d1e77
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge "Scan through all merged reftables for max/min update indices"
Terry Parker [Mon, 23 Mar 2020 14:51:45 +0000 (10:51 -0400)]
Merge "Scan through all merged reftables for max/min update indices"

4 years agoUpdate to org.apache.sshd 2.4.0 42/159742/2
Thomas Wolf [Thu, 12 Mar 2020 18:38:57 +0000 (19:38 +0100)]
Update to org.apache.sshd 2.4.0

Change target platforms to Orbit I20200319180910 and regenerate them.
Change package imports to [2.4.0,2.5.0); adapt code to upstream API
changes.

Maven build: update version in root pom.

Bazel build: update version & hash in WORKSPACE file.

Proxy functionality verified manually using 3proxy (HTTP & SOCKS,
with basic authentication) and ssh -vvv -D7020 localhost (SOCKS, no
authentication).

Bug: 561078
Change-Id: I582f6b98055b013c006f2c749890fe6db801cbaa
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoScan through all merged reftables for max/min update indices 67/159767/2
Minh Thai [Fri, 20 Mar 2020 06:10:41 +0000 (23:10 -0700)]
Scan through all merged reftables for max/min update indices

Since reftables might have update index ranges that are overlapped.

Change-Id: I8f8215b99a0a978d4dd0155dbaf33e5e06ea8202
Signed-off-by: Minh Thai <mthai@google.com>
4 years agoResolveMerger: Ignore merge conflicts if asked so 92/159692/2
Ivan Frade [Wed, 18 Mar 2020 05:29:59 +0000 (22:29 -0700)]
ResolveMerger: Ignore merge conflicts if asked so

The recursive merge strategy builds a virtual ancestor merging
recursively the common bases (when more than one) between the
want-to-merge commits. While building this virtual ancestor, content
conflicts are ignored, but current code doesn't do so when a file is
removed.

This was spotted in [1], for example. Merging two commits to build the
virtual ancestor bumped into a conflict (modified in one side, deleted
in the other) that stopped the process.

Follow the "spec" and in case of conflict leave the unmerged content in
the index and working trees.

[1] https://android-review.googlesource.com/c/kernel/common/+/1228962

Change-Id: Ife9c32ae3ac3a87d3660fa1242e07854b65169d5
Signed-off-by: Ivan Frade <ifrade@google.com>
4 years agoUpgrade spotbugs-maven-plugin to 4.0.0 89/159489/3
David Pursehouse [Tue, 17 Mar 2020 00:20:12 +0000 (09:20 +0900)]
Upgrade spotbugs-maven-plugin to 4.0.0

Change-Id: I28369d116eff053e27d6853a3df914e58120fde5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade maven-javadoc-plugin to 3.2.0 88/159488/2
David Pursehouse [Tue, 17 Mar 2020 00:18:55 +0000 (09:18 +0900)]
Upgrade maven-javadoc-plugin to 3.2.0

Change-Id: I355ca6ad9e050bf46d49a6f91365d86213d84b94
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade maven-dependency-plugin to 3.1.2 81/159281/2
David Pursehouse [Fri, 13 Mar 2020 00:05:32 +0000 (09:05 +0900)]
Upgrade maven-dependency-plugin to 3.1.2

Change-Id: I48b4b8366404b01e394bb2dac08e19f0eebbd759
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>