]> source.dussan.org Git - jgit.git/log
jgit.git
5 years agoHandle missing "ours" stage in WorkingTreeIterator.hasCrLfInIndex() 16/143716/1
Thomas Wolf [Tue, 11 Jun 2019 11:16:18 +0000 (13:16 +0200)]
Handle missing "ours" stage in WorkingTreeIterator.hasCrLfInIndex()

In a delete-modify conflict with the deletion as "ours" there may be
no stage 2 in the index. Add appropriate null checks. Add a new test
for this case, and verify that the file gets added with a single LF
after conflict resolution with core.autocrlf=true. This matches the
behavior of canonical git for this case.

Bug: 547724
Change-Id: I1bafdb83d9b78bf85294c78325e818e72fae53bc
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoConfig: Add helper method to check for empty value 75/143575/4
David Pursehouse [Sat, 8 Jun 2019 06:01:44 +0000 (15:01 +0900)]
Config: Add helper method to check for empty value

Rename MAGIC_EMPTY_VALUE to MISSING_ENTRY, make it private, and add
a helper method to check if a given string is that value.

This avoids that callers trigger the "reference equality" warning
from Error Prone.

Change-Id: Idc76f78c0cf1828aa48d02ee33911a4b5df50355
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoErrorProne: Increase severity of FutureReturnValueIgnored to ERROR 77/143577/4
David Pursehouse [Sat, 8 Jun 2019 06:47:42 +0000 (15:47 +0900)]
ErrorProne: Increase severity of FutureReturnValueIgnored to ERROR

The only remaining code where the return value is ignored is in tests.
Update them to store the value and perform a basic assertion.

Change-Id: I29ef5bd5dd0648aac3490f9e47ecc74544109652
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFS_Win32: Add missing parentheses on if-blocks 76/143576/4
David Pursehouse [Sat, 8 Jun 2019 06:06:22 +0000 (15:06 +0900)]
FS_Win32: Add missing parentheses on if-blocks

Change-Id: I70504484f20aee103e51c852d71cd41b54093793
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade spotbugs to 3.1.12 52/143652/2
David Pursehouse [Tue, 11 Jun 2019 00:24:26 +0000 (09:24 +0900)]
Upgrade spotbugs to 3.1.12

Change-Id: I8093ce8342ab98f12ffabaf2862e6f1b161c4c87
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoAbbreviated{Long}ObjectId: Make operator precedence explicit 79/143579/4
David Pursehouse [Sat, 8 Jun 2019 07:25:32 +0000 (16:25 +0900)]
Abbreviated{Long}ObjectId: Make operator precedence explicit

Change-Id: Iafd616d3fdc81ac3072f776061548be195270d85
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoGC: Update TODO comments 78/143578/4
David Pursehouse [Sat, 8 Jun 2019 06:48:57 +0000 (15:48 +0900)]
GC: Update TODO comments

The TODO comments say "in 5.0", but 5.0 was already released without
resolving them. Remove "in 5.0" on the assumption that the mentioned
improvements still need to be done at some point.

Change-Id: I3eb429803e2266de3fc490e1f3912991c08aa1ad
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFS_POSIX: Fix reference comparison of Boolean.FALSE 74/143574/3
David Pursehouse [Sat, 8 Jun 2019 05:54:19 +0000 (14:54 +0900)]
FS_POSIX: Fix reference comparison of Boolean.FALSE

Change-Id: Ic205d017b365ea85983d0b0d9d033fcf7e6bf6ab
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoIncrease bazel timeout for long running tests 48/143648/2
Matthias Sohn [Mon, 10 Jun 2019 21:35:20 +0000 (23:35 +0200)]
Increase bazel timeout for long running tests

EolRepositoryTest and GcCommitSelectionTest timed out frequently when
running unit tests using bazel with the default timeout "moderate"
(300s). Increase timeout of these tests to "long" (900s).

Change-Id: I43588cf950f55b50f868d9fe9c66d22bd428a54c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUse bazelisk to switch between used bazel version 84/143584/2
David Ostrovsky [Sat, 8 Jun 2019 15:33:28 +0000 (17:33 +0200)]
Use bazelisk to switch between used bazel version

Bazelisk is utility to switch to the right Bazel version, that we
used to have with Buck build tool: [1].

Bazelisk will download the right Bazel version only once and will use
it in subsequent calls:

  $ bazelisk build :release
  2019/06/06 16:22:15 Downloading \
  https://releases.bazel.build/0.26.1/release/bazel-0.26.1-linux-x86_64...

Bazelisk is storing the binaries in user's cache directory: [2], e.g.
on Linux OS:

  $ ls -1 ~/.cache/bazelisk/bin
  bazel-0.26.1-linux-x86_64

* [1] https://github.com/bazelbuild/bazelisk
* [2] https://golang.org/pkg/os/#UserCacheDir

Change-Id: Ia9180fb75f8cc17a0a0232622cf33a13bfad6b60
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
5 years agoBump minimum Bazel version to 0.26.1 83/143583/2
David Ostrovsky [Sat, 8 Jun 2019 15:32:35 +0000 (17:32 +0200)]
Bump minimum Bazel version to 0.26.1

Change-Id: I8d6f9eac5af54e5b270e7db4e52d1b4063c1aa56
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
5 years agoBazel: Bump skylib library version to 0.8.0 82/143582/2
David Ostrovsky [Sat, 8 Jun 2019 15:31:33 +0000 (17:31 +0200)]
Bazel: Bump skylib library version to 0.8.0

Change-Id: I2089899c9f197b2c93b93390fdd55f6fe11e5ce4
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
5 years agoRetry loading config when locked by another process 30/126730/3
Michael Keppler [Sun, 29 Jul 2018 05:53:11 +0000 (07:53 +0200)]
Retry loading config when locked by another process

When loading the config, a FileNotFoundException may occur if the file
exists but cannot be read (see [1]). This is the case on Windows with a
virus scanner checking the file. Therefore if the file exists and that
exception is thrown, retry multiple times, similar to how this was
already implemented for IOException.

[1] https://docs.oracle.com/javase/8/docs/api/java/io/FileNotFoundException.html

Bug: 529522
Change-Id: Ic5dc3b7b24bb0005d6256ed00513bc7c0b91e613
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMake pull --rebase on an unborn branch do a checkout 67/137967/2
Thomas Wolf [Sun, 3 Mar 2019 23:07:40 +0000 (00:07 +0100)]
Make pull --rebase on an unborn branch do a checkout

A merging pull on an unborn branch was already supported. But a
rebasing pull failed. If the user has pull.rebase = true in his
user config, the pull would try to rebase. Rebasing needs a parent
commit, though. Native git handles this case:

  git init
  git remote add origin <URI>
  git pull --rebase origin master

Check up front in PullCommand for the unborn head and just do a
checkout in this case. MergeCommand already has similar code.

Bug: 544965
Change-Id: I1277e1ac0b0364b4623fd791f3d6b07bd5f58fca
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoWarn if configured cookie file is missing 94/143594/2
Matthias Sohn [Sun, 9 Jun 2019 07:49:07 +0000 (09:49 +0200)]
Warn if configured cookie file is missing

We logged a stack trace if the configured http.cookieFile was missing.
Instead only log a warning.

Bug: 548081
Change-Id: I42e39f5ad8ffce7b43162e5068f60af073b8a126
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoHandle escaped CR-LF in git config files 38/140138/4
Thomas Wolf [Fri, 5 Apr 2019 19:33:14 +0000 (21:33 +0200)]
Handle escaped CR-LF in git config files

Canonical git treats CR-LF in config files as LF.[1][2] JGit does so,
too, except when escaped as a line continuation. Correct this and
treat the sequence \-CR-LF as a line continuation.

[1] https://github.com/git/git/commit/db2c075d9
[2] https://github.com/git/git/blob/v2.21.0/config.c#L485

Bug: 545850
Change-Id: I51e7378a22c21b3baa3701163c423d04c900af5a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDescribeCommand: use glob match instead of path match 30/141730/2
Thomas Wolf [Tue, 30 Apr 2019 17:11:16 +0000 (19:11 +0200)]
DescribeCommand: use glob match instead of path match

Otherwise tags may fail to match if their name contains slashes.
Canonical git also uses its wildcard matcher in glob mode.[1]

[1] https://github.com/git/git/blob/v2.21.0/builtin/describe.c#L182

Bug: 546703
Change-Id: I122c7959974fa1fc6a53dfc65837e4314a8badd4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoFix off-by-one error in RebaseTodoFile when reading a todo file 25/140925/2
Thomas Wolf [Sun, 21 Apr 2019 19:23:30 +0000 (21:23 +0200)]
Fix off-by-one error in RebaseTodoFile when reading a todo file

Commit messages of length 1 were not read. 'lineEnd' is the offset
of the last character in the line before the terminating LF or CR-LF,
and 'nextSpace' is actually the offset of the character _after_ the
next space. With a one-character commit message, nextSpace == lineEnd.

The code also assumes the commit message to be optional, but actually
failed in that case because it read beyond the line ending. Fix that,
too.

Add a test case for reading a todo file.

Bug: 546245
Change-Id: I368d63615930ea2398a6230e756442fd88870654
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoConsistently use "!isEmpty()" to detect non-empty list 83/143483/1
David Pursehouse [Fri, 7 Jun 2019 03:12:44 +0000 (12:12 +0900)]
Consistently use "!isEmpty()" to detect non-empty list

Replace "size() > 0" with "!isEmpty()" where appropriate.

In the Status implementation we can drop the check; the subsequent
loop will only execute when the list is non-empty anyway.

Change-Id: I355aff551a603373e702a9d44304f087b476263c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoTransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0" 81/143481/1
David Pursehouse [Fri, 7 Jun 2019 01:59:46 +0000 (10:59 +0900)]
TransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0"

Change-Id: Iabb627c8f584346eb8ace3c24afb63b4d1ad3d47
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoTransportHttp: Fix comparison of size with ">= 0" 80/143480/1
David Pursehouse [Fri, 7 Jun 2019 01:57:15 +0000 (10:57 +0900)]
TransportHttp: Fix comparison of size with ">= 0"

Error Prone reports:

  [SizeGreaterThanOrEqualsZero] Comparison of a size >= 0 is always true,
  did you intend to check for non-emptiness?

  see https://errorprone.info/bugpattern/SizeGreaterThanOrEqualsZero

Change-Id: Ie964771cacca4b15569eb45f6e273ad2a7e2e49c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoNetscapeCookieFileTest: Split HttpCookiesMatcher to own class 79/143479/1
David Pursehouse [Fri, 7 Jun 2019 01:51:21 +0000 (10:51 +0900)]
NetscapeCookieFileTest: Split HttpCookiesMatcher to own class

The bazel build fails due to NetscapeCookieFileTest's internal class not
being visible to TransportHttpTest.

Split the file out to its own class in the util package, so it's visible
to both.

Change-Id: I69236026eecb9d08a9a66e51752a80ea522b0c6a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBazel: Add missing dependency on mockito for TransportHttpTest 78/143478/1
David Pursehouse [Fri, 7 Jun 2019 01:22:13 +0000 (10:22 +0900)]
Bazel: Add missing dependency on mockito for TransportHttpTest

Change-Id: I54eff21c7aa8ee4b3b4a2fea60c5bca359256808
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoDetermine hard-linking and nlink support per FileStore 85/142385/2
Thomas Wolf [Sat, 18 May 2019 21:48:54 +0000 (23:48 +0200)]
Determine hard-linking and nlink support per FileStore

It's quite possible that JGit can use the hard-linking mechanism
for atomic file creation on some volumes but not on others.
Ultimately it depends on the file systems on the mounted volumes.

Cache the information per FileStore instead of using a single
global flag. Also catch FileSystemException, it may be thrown
if the operating system reports a failure. The previously caught
AccessDeniedException is a sub-class of FileSystemException.

Bug: 547332
Change-Id: I1ef672b3468b0be79e71674344f16f28f9d11ba1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoSupport reading and writing cookies. 04/132704/25
Konrad Windszus [Mon, 19 Nov 2018 17:10:07 +0000 (18:10 +0100)]
Support reading and writing cookies.

The git config entries "http.cookieFile" and
"http.saveCookies" are correctly evaluated.

Bug: 488572
Change-Id: Icfeeea95e1a5bac3fa4438849d4ac2306d7d5562
Signed-off-by: Konrad Windszus <konrad_w@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoRepository: Add getIdentifier() method to avoid instanceof operator 61/142261/12
David Ostrovsky [Thu, 16 May 2019 15:06:57 +0000 (17:06 +0200)]
Repository: Add getIdentifier() method to avoid instanceof operator

This change is needed to implement permission aware ref database in
Gerrit: [1], that is a pre-requisite to re-enable Git v2 protocol in
Gerrit: [2].

Background: Last year Git v2 protocol was enabled in Gerrit. The fact,
that JGit layer was not calling ref advertise filter for Git v2
protocol, introduced security vulnerability.

The lesson learned from this security incident: Gerrit should not rely
on ref advertise filter being called by JGit to implement crictical
security checks. Instead, the idea is to use the same approach as
currently used by Google's internal code on googlesource.com that
didn't suffer from this vulnerability: provide a custom repository to
JGit. The repository provides a RefDatabase that is permission-aware
and will only ever return refs that the user has access to.

However, due to hard coded instanceof operator usages in JGit code
base, some tests in Gerrit are failing with: [1] in place. This change
addresses this problem.

[1] https://gerrit-review.googlesource.com/c/gerrit/+/212874
[2] https://gerrit-review.googlesource.com/c/gerrit/+/226754

Change-Id: I67c0f53ca33b149442e7ee3e51910d19e3f348d5
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate to Orbit R20190602212107 93/143193/2
Matthias Sohn [Mon, 3 Jun 2019 07:55:20 +0000 (09:55 +0200)]
Update to Orbit R20190602212107

This version fixed wrong
Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9))"
in bouncycastle 1.61.

Bug: 547570
Change-Id: I715bcc4b39c3d4ad036dcc5bbdf48d321759f55f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPacketLineIn: Deprecate the END constant 76/143176/3
David Pursehouse [Sun, 2 Jun 2019 08:27:17 +0000 (17:27 +0900)]
PacketLineIn: Deprecate the END constant

Deprecate the constant with the intention of making it private in
a future release.

All existing usage of the constant within JGit code has already been
replaced with the recommended alternatives in preceding commits.

Change-Id: I10eb95f3f92cb74f93a26bf1a6edd24615b75c6f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoPacketLineIn: Add an iterator over strings in the input stream 75/143175/3
David Pursehouse [Sun, 2 Jun 2019 08:02:51 +0000 (17:02 +0900)]
PacketLineIn: Add an iterator over strings in the input stream

Allows callers to read all lines in the input stream until the
END marker is reached, without having to explicitly check for
the END marker.

Replace all remaining usage of the END marker with the new method.

Change-Id: I51f419c7f569ab7ed01e1aaaf6b40ed8cdc2116b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoReplace most usages of PacketLineIn.END with PacketLineIn.end() 73/143173/3
David Pursehouse [Sun, 2 Jun 2019 03:50:34 +0000 (12:50 +0900)]
Replace most usages of PacketLineIn.END with PacketLineIn.end()

PacketLineIn.END is only referenced in tests. Replace most of those
with a new package visible end() method.

Remaining usages of PacketLineIn.END are in the form:

  while ((line = pckIn.readString()) != PacketLineIn.END) {

and are not trivial replacements, hence are not touched in this change.

Change-Id: Id77c5321ddcad127130b246bde8f08736e60e1ea
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoPacketLineIn: Deprecate DELIM constant 72/143172/3
David Pursehouse [Sun, 2 Jun 2019 02:13:36 +0000 (11:13 +0900)]
PacketLineIn: Deprecate DELIM constant

Deprecate DELIM with the intention of making it private in a future
release.

Callers that want to test if a packet line string is the delimiter
should use the isDelimiter(String) method.

The only other references to DELIM in the JGit code are in tests. For
those, introduce a package visible delimiter() method.

Change-Id: I21e8bbac0ffb9ef710c9753e23435416b09a4891
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoReplace trivial reference comparison of PacketLineIn.{DELIM,END} 71/143171/2
David Pursehouse [Sun, 2 Jun 2019 02:04:59 +0000 (11:04 +0900)]
Replace trivial reference comparison of PacketLineIn.{DELIM,END}

Replace reference comparisons of PacketLineIn's DELIM and END strings
with usage of the helper methods isDelimiter() and isEnd().

Change-Id: I52dcfc4ee9097f1bd6970601c716701847d9eebd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoPacketLineIn: Rename isDelim to isDelimiter 70/143170/2
David Pursehouse [Sun, 2 Jun 2019 02:16:52 +0000 (11:16 +0900)]
PacketLineIn: Rename isDelim to isDelimiter

Change-Id: I279808b8ddd8a9230a35582c00867b811633dfe8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoProtocolV2ParserTest: Fix typo in comment 69/143169/1
David Pursehouse [Sun, 2 Jun 2019 02:11:28 +0000 (11:11 +0900)]
ProtocolV2ParserTest: Fix typo in comment

Change-Id: I22b07179ba6e2517ae3e178c31fde20987cead34
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade Bouncy Castle to 1.61 19/140719/8
Brandon Weeks [Tue, 16 Apr 2019 22:15:46 +0000 (00:15 +0200)]
Upgrade Bouncy Castle to 1.61

Also now use JcaKeyBoxBuilder constructor in
BouncyCastleGpgKeyLocator.readKeyBoxFile(Path).

CQ: 19868
CQ: 19869
CQ: 19870
Change-Id: I45bd80e158aecd90448b0c7e59615db27aaef892
Signed-off-by: Brandon Weeks <bweeks@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate to Orbit R20190531194818 and rollback update to Ant 1.10.6 58/143158/2
Matthias Sohn [Fri, 31 May 2019 12:57:06 +0000 (14:57 +0200)]
Update to Orbit R20190531194818 and rollback update to Ant 1.10.6

An issue has been reported with Java 1.8 and new Ant version 1.10.6
hence this was rolled back to 1.10.5 in Orbit.

See: https://bz.apache.org/bugzilla/show_bug.cgi?id=63457
Bug: 547607
Change-Id: I9c04c988ec89bb1e2cbb528a2d3add30a0b7b3b9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agocli: Add the --always option to describe 75/138975/7
Sebastian Schuberth [Mon, 18 Mar 2019 21:04:05 +0000 (22:04 +0100)]
cli: Add the --always option to describe

Change-Id: I0342d589e4deabe9d80ea3c9c6b48d7b265d8fe6
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoDescribeCommand: Support the "always" option 22/138922/9
Sebastian Schuberth [Fri, 15 Mar 2019 14:27:18 +0000 (15:27 +0100)]
DescribeCommand: Support the "always" option

See:

https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---always

Extend the tests accordingly.

Change-Id: Ibfcda338a246c8cba0df6b6e7b9bad76c9f8b593
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agocli: Add the --tags option to describe 74/138974/7
Sebastian Schuberth [Mon, 18 Mar 2019 21:00:15 +0000 (22:00 +0100)]
cli: Add the --tags option to describe

Change-Id: I78924e61e2050eeaff991ee56715f36514100492
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoDescribeCommand: Consistenly omit the default value 32/143132/1
Sebastian Schuberth [Fri, 31 May 2019 15:08:39 +0000 (17:08 +0200)]
DescribeCommand: Consistenly omit the default value

Omit the default value of "false" for "useTags" like already done for
"longDesc".

Change-Id: I25aaacae028fc8cf27f4040ba45fe79609318aa1
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoRemove excess blank line in FileUtilsTest 89/143089/2
Matthias Sohn [Thu, 30 May 2019 21:51:05 +0000 (23:51 +0200)]
Remove excess blank line in FileUtilsTest

Change-Id: I0d617feb7baacf9917b1da605fcb75f7d4ccd184
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPacketLineIn: Add helper methods to check for END and DELIM 63/143063/1
David Pursehouse [Thu, 30 May 2019 11:31:39 +0000 (20:31 +0900)]
PacketLineIn: Add helper methods to check for END and DELIM

These methods will allow clients to check for END and DELIM without
doing a reference comparison on the String objects, which raises
warnings from Error Prone.

Change-Id: I9e7e59843553ed4488ee8e864033198bbb60d67c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUploadPackTest: Rename variable to avoid hiding class member 62/143062/1
David Pursehouse [Thu, 30 May 2019 11:18:28 +0000 (20:18 +0900)]
UploadPackTest: Rename variable to avoid hiding class member

Change-Id: I9e02642b2f56a735681e58b8c8d6e3545ef9093b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUploadPackTest: Add missing <> operator on instantiation of ArrayList 61/143061/1
David Pursehouse [Thu, 30 May 2019 11:17:24 +0000 (20:17 +0900)]
UploadPackTest: Add missing <> operator on instantiation of ArrayList

Change-Id: I348cbcd75252d7857ada843dc496d445ee1d62fb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBitmapCalculator: javadoc fixes 88/142688/2
Ivan Frade [Thu, 23 May 2019 17:39:31 +0000 (10:39 -0700)]
BitmapCalculator: javadoc fixes

Fill out the description of when IOException is thrown.

Also fix a typo in the description for IncorrectObjectTypeException.

Change-Id: I9fafd19d68ddc4fe4e95e8516c2c38484b941a3a
Signed-off-by: Ivan Frade <ifrade@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoRevWalkUtils: add progress callback to findBranchesReachableFrom 77/142777/2
Andrey Loskutov [Sat, 25 May 2019 07:53:47 +0000 (09:53 +0200)]
RevWalkUtils: add progress callback to findBranchesReachableFrom

Offer a version of findBranchesReachableFrom method with progress
monitor callback. This is required to allow UI clients to cancel long
running operations and show progress.

Bug: 547642
Change-Id: I31d1de54dbaa6ffb11e03da4c447963e8defa1d0
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
5 years agoMerge branch 'stable-5.4' 99/142699/1
David Pursehouse [Thu, 23 May 2019 23:34:32 +0000 (08:34 +0900)]
Merge branch 'stable-5.4'

* stable-5.4:
  SystemReader: Respect passed-in parent when no system config is present
  Prepare 5.4.0-SNAPSHOT builds
  JGit v5.4.0.201905221418-m3
  Prepare 5.4.0-SNAPSHOT builds
  JGit v5.4.0.201905081430-m2

Change-Id: If69cb0afe9915b926d977e4ad26c7d72db31667c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.3' into stable-5.4 98/142698/1
David Pursehouse [Thu, 23 May 2019 23:33:41 +0000 (08:33 +0900)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  SystemReader: Respect passed-in parent when no system config is present

Change-Id: I758ed0c2a3527ffcf6255158a49090aba090e942
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoSystemReader: Respect passed-in parent when no system config is present 97/142697/1
Dave Borowitz [Thu, 23 May 2019 20:56:00 +0000 (13:56 -0700)]
SystemReader: Respect passed-in parent when no system config is present

The default implementation of openSystemConfig has special handling for
when the FS returns null from getGitSystemConfig: it should return a
"real" FileBasedConfig instance that never actually tries to load a
file. However, this codepath was not respecting the passed-in parent
config.

Change-Id: Id0bcdc93bb42f9ebe3f5ee4c6b4be8863e0133f9

5 years agoUpgrade maven-source-plugin to 3.1.0 63/142463/3
David Pursehouse [Mon, 20 May 2019 23:25:38 +0000 (08:25 +0900)]
Upgrade maven-source-plugin to 3.1.0

Change-Id: I8253e75f5038b6c0e2205d74683e0ebd9839dd33
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade maven-jar-plugin to 3.1.2 56/142056/4
David Pursehouse [Mon, 13 May 2019 09:24:29 +0000 (11:24 +0200)]
Upgrade maven-jar-plugin to 3.1.2

Change-Id: I9a291390205ee8c44b02c4081f2d8f17635d90ec
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade jacoco-maven-plugin to 0.8.4 55/142055/4
David Pursehouse [Mon, 13 May 2019 09:23:31 +0000 (11:23 +0200)]
Upgrade jacoco-maven-plugin to 0.8.4

Change-Id: Ibab24e1f5eefdc14bcf9ab6d72eab7e0a0cfaad9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoBitmapCalculator and its test: add missing license header 40/142640/1
Matthias Sohn [Thu, 23 May 2019 00:12:16 +0000 (02:12 +0200)]
BitmapCalculator and its test: add missing license header

Change-Id: I3c4a8b1e9159b0553aa95213bb82628370b6c036
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.4.0-SNAPSHOT builds 31/142631/1
Matthias Sohn [Wed, 22 May 2019 20:52:43 +0000 (22:52 +0200)]
Prepare 5.4.0-SNAPSHOT builds

Change-Id: I9df6fccee253d4087f9afab4cb46e0a40b8a5699
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.4.0.201905221418-m3 12/142612/1 v5.4.0.201905221418-m3
Matthias Sohn [Wed, 22 May 2019 18:18:14 +0000 (20:18 +0200)]
JGit v5.4.0.201905221418-m3

Change-Id: I8a7e687acfcf8c341abd726ae60b5ee173422215
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoRevWalk: new method createReachabilityChecker() 68/142468/6
Ivan Frade [Tue, 21 May 2019 00:14:22 +0000 (17:14 -0700)]
RevWalk: new method createReachabilityChecker()

Every caller would need to check if bitmaps are available in the repo to
instantiate a reachability checker.

Offer a method to create the reachability checker in the walk: the
caller has already a walk over the repo, and the walk has all the
information required.

This allows us to make the implementation classes package-private.

Change-Id: I355e47486fcd9d55baa7cb5700ec08dcc230eea5
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge branch 'master' into stable-5.4 09/142609/1
Matthias Sohn [Wed, 22 May 2019 17:37:40 +0000 (19:37 +0200)]
Merge branch 'master' into stable-5.4

* master:
  ReachabilityCheckers: @since 5.4
  Update Orbit to S20190521195709 for 2019-06 M3
  Tune max heap size for tests
  GPG: check that the key found is a signing key
  GPG: use key fingerprint suffix to compare id for signing key
  Recognize ReachabilityCheckerTestCase as helper
  UploadPack: restore inadvertently deleted line
  UploadPack: Use reachability checker to validate non-advertised wants
  Bazel: Simplify names of bouncy castle libraries
  Convert to lambda or member reference
  BitmappedReachabilityChecker: Reachability check using bitmaps
  BitmapCalculator: Get the reachability bitmap of a commit
  ReachabilityChecker: Default implementation with a RevWalk

Change-Id: I323c460853230abcffa94c4f34f15dbaff8c330c

5 years agoReachabilityCheckers: @since 5.4 65/142465/3
Ivan Frade [Mon, 20 May 2019 23:46:47 +0000 (16:46 -0700)]
ReachabilityCheckers: @since 5.4

The new ReachabilityChecker interface and its implementations are marked
as @since 5.5, but they will make it to the 5.4 release.

Change-Id: I88c31b3300ccf35d18c35faddb2517f0a57bdcfd
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoUpdate Orbit to S20190521195709 for 2019-06 M3 03/142603/1
Matthias Sohn [Wed, 22 May 2019 15:34:58 +0000 (17:34 +0200)]
Update Orbit to S20190521195709 for 2019-06 M3

Update
- org.apache.ant to 1.10.6.v20190516-0412 (CQ 19829)
- org.apache.httpcomponents.httpclient to 4.5.6.v20190503-0009

CQ: 19829
Change-Id: Ia057d4f07dab21374ca66c3d87a2bab1c795562c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoTune max heap size for tests 90/142590/1
Matthias Sohn [Wed, 22 May 2019 12:42:43 +0000 (14:42 +0200)]
Tune max heap size for tests

This is an attempt to fix crashes observed on the new Jenkins
infrastructure running on Kubernetes [1].

Increase it to 512m for
- org.eclipse.jgit.ant.test
- org.eclipse.jgit.http.test
- org.eclipse.jgit.lfs.server.test
- org.eclipse.jgit.lfs.test
- org.eclipse.jgit.pgm.test

Decrease it to 768m for
- org.eclipse.jgit.test

[1] e.g. https://ci-staging.eclipse.org/jgit/job/stable/job/jgit.gerrit/16074/console

Change-Id: Id074ed0f7bcb8a13da649a547342af2a08439d9f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoGPG: check that the key found is a signing key 33/142533/1
Thomas Wolf [Tue, 21 May 2019 16:09:37 +0000 (18:09 +0200)]
GPG: check that the key found is a signing key

Throw an exception if not.

Change-Id: I60f36b271d5f44c6dc475302b169cb5b8a1e3945
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoGPG: use key fingerprint suffix to compare id for signing key 32/142532/1
Thomas Wolf [Tue, 21 May 2019 16:08:48 +0000 (18:08 +0200)]
GPG: use key fingerprint suffix to compare id for signing key

Check whether the value of the git config user.signingKey is a suffix
of the full fingerprint of the key. This was already used for finding
keys in secring.gpg, but not in pubring.kbx. This mechanism allows a
user to use any unique suffix to identify keys; to avoid needless
collisions it's recommended to use at least the last 16 characters of
the hex representation of the fingerprint, which is the key id.[1]

[1] https://tools.ietf.org/html/rfc4880#section-12.2

Bug: 545673
Change-Id: If6fb4879502b6ee4b8c26c21b2714aeac4e4670c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoMerge "Recognize ReachabilityCheckerTestCase as helper"
Jonathan Nieder [Tue, 21 May 2019 03:14:34 +0000 (23:14 -0400)]
Merge "Recognize ReachabilityCheckerTestCase as helper"

5 years agoRecognize ReachabilityCheckerTestCase as helper 67/142467/1
Jonathan Tan [Tue, 21 May 2019 00:02:07 +0000 (17:02 -0700)]
Recognize ReachabilityCheckerTestCase as helper

4e196faa1b ("ReachabilityChecker: Default implementation with a
RevWalk", 2019-05-15) added ReachabilityCheckerTestCase but did not add
it as a test helper in the corresponding BUILD file, making tests no
longer runnable with Bazel. Resolve this issue.

Change-Id: Iccc00b0d169dbaa137e130ce2ddd1b7669960b52
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
5 years agoUploadPack: restore inadvertently deleted line 62/142462/1
Jonathan Tan [Mon, 20 May 2019 23:22:31 +0000 (16:22 -0700)]
UploadPack: restore inadvertently deleted line

In 7b96bd812e ("UploadPack: Use reachability checker to validate
non-advertised wants", 2019-05-16), a "walk.setRetainBody(false);"
statement was inadvertently deleted. (An earlier version of this commit
had this line in another part of the code and a review comment suggested
to move it back here; the line was then deleted from the other part of
the code but not readded.) Restore this line.

Change-Id: I96ff6106ba9e4eef429388c83e898b3363295f69
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
5 years agoMerge changes from topic 'reachability-2'
Jonathan Tan [Mon, 20 May 2019 20:04:28 +0000 (16:04 -0400)]
Merge changes from topic 'reachability-2'

* changes:
  UploadPack: Use reachability checker to validate non-advertised wants
  BitmappedReachabilityChecker: Reachability check using bitmaps
  BitmapCalculator: Get the reachability bitmap of a commit
  ReachabilityChecker: Default implementation with a RevWalk

5 years agoUploadPack: Use reachability checker to validate non-advertised wants 46/141846/5
Ivan Frade [Wed, 8 May 2019 23:43:04 +0000 (16:43 -0700)]
UploadPack: Use reachability checker to validate non-advertised wants

In "Reachable commit" request validators, we need to check that a "want"
in the request, that hasn't been advertised, is reachable from the refs
visible to the user.

Current code has intermixed the translation of ObjectIds to RevCommits
(and its error handling) with the actual walk, with the delegation to
bitmaps in restricted circunstances.

Refactor the code to make it "flatter" and more readable. Move ObjectIds
to RevCommits translation to its own functions. Use the reachability
checker instead of a newly defined walk.

Before the non-advertised wants were validated with bitmaps only if any
"want" refered to an non-commit. Now they will be validated with bitmaps
also if the "wants" refer all to commits.

Change-Id: Ib925a48cde89672b07a88bba4e24d0457546baff
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoBazel: Simplify names of bouncy castle libraries 72/142272/1
David Ostrovsky [Thu, 16 May 2019 16:56:12 +0000 (18:56 +0200)]
Bazel: Simplify names of bouncy castle libraries

Name bouncy castle libraries consistently. This also allows to use
local jgit tree as dependency in gerrit.

Change-Id: Ie0a995a70ecee907d25b3cdda9034a25c0290efe
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
5 years agoConvert to lambda or member reference 62/140162/14
Carsten Hammer [Sat, 6 Apr 2019 18:13:26 +0000 (20:13 +0200)]
Convert to lambda or member reference

Convert anonymous inner classes to lambda expressions or member
references

Bug: 545856
CQ: 19537
Change-Id: I621431c178e8b99316314602f7c66c9a36f9ae98
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoBitmappedReachabilityChecker: Reachability check using bitmaps 58/140958/10
Ivan Frade [Mon, 22 Apr 2019 22:38:45 +0000 (15:38 -0700)]
BitmappedReachabilityChecker: Reachability check using bitmaps

The "basic" reachability check walks the graph starting from the tips
marking things as "uninteresting". If the target commit is marked as
"uninteresting" it was reached; it is reachable from those tips.

This requires a lot of walking and can be solved directly with bitmaps.
Most of the time the bitmaps are already calculated or a short walk
away.

This should improve the performance of reachability checks, for example
in Gitiles.

Change-Id: I83d33271f58d95d2dc9ed151967b3eda513c99f7
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoBitmapCalculator: Get the reachability bitmap of a commit 33/141733/4
Ivan Frade [Tue, 7 May 2019 03:39:18 +0000 (20:39 -0700)]
BitmapCalculator: Get the reachability bitmap of a commit

To make reachability checks with bitmaps, we need to get the
reachability bitmap of a commit, which is not always precalculated.

There is already a class returning such bitmap (BitmapWalker) but it
does too much unnecessary work: it calculates ALL reachable objects from
a commit (i.e. including trees and blobs), when for reachability the
commits are just enough.

Introduce BitmapCalculator to get the bitmap of a commit: either because
it is precalculated or generating it with a walk only over commits.

Change-Id: Ibb6c78affe9eeaf1fa362a06daf4fd2d91c1caea
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoReachabilityChecker: Default implementation with a RevWalk 56/140956/6
Ivan Frade [Mon, 22 Apr 2019 18:37:43 +0000 (11:37 -0700)]
ReachabilityChecker: Default implementation with a RevWalk

It is common to check if a certain commit is reachable from some
starting points. For example gitiles does it to check if a commit
is visible to a user based on its permissions.

Offer this functionality in JGit.

Split the interface as the next commit will introduce an implementation
using bitmap indices.

Change-Id: I0933b305c8d734f7a64502910ff4d9ef4fc92ae1
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoPrepare 5.4.0-SNAPSHOT builds 60/142160/1
Matthias Sohn [Wed, 15 May 2019 07:16:58 +0000 (09:16 +0200)]
Prepare 5.4.0-SNAPSHOT builds

Change-Id: Ieb4b049972509631f06b5268a90f432a1b9ee207
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.4.0.201905081430-m2 12/141812/1 v5.4.0.201905081430-m2
Matthias Sohn [Wed, 8 May 2019 18:28:19 +0000 (20:28 +0200)]
JGit v5.4.0.201905081430-m2

Change-Id: I535a98d8ef507d3c8cda7b0f042a2ae835da1279
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoApache MINA sshd client: test reading encrypted ed25519 keys 56/141356/2
Thomas Wolf [Tue, 15 Jan 2019 18:50:12 +0000 (19:50 +0100)]
Apache MINA sshd client: test reading encrypted ed25519 keys

Add encrypted ed25519 keys in the tests; sshd 2.2.0 can finally
decrypt encrypted new-style OpenSSH key files. (Needs the "unlimited
strength" JCE, which is the default since Java 8u161. On older JREs,
users should install the policy files available from Oracle.)

The "expensive" key added has been generated with OpenSSH's
ssh-keygen -t ed25519 -a 256, i.e., with 256 bcrypt KDF rounds
instead of the default 16. On my machine it takes about 2sec to
decrypt.

Bug: 541703
Change-Id: Id3872ca2fd75d8f009cbc932eeb6357d3d1f267c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoApache MINA sshd client: adapt to sshd 2.2.0 55/141355/2
Thomas Wolf [Mon, 14 Jan 2019 16:30:03 +0000 (17:30 +0100)]
Apache MINA sshd client: adapt to sshd 2.2.0

Update target platforms, maven and bazel builds to use sshd 2.2.0.

Adapt internal classes to changed sshd interfaces and remove previous
work-arounds for asking repeatedly for key passwords and for loading
keys lazily; both are now done by sshd.

CQ: 19034
CQ: 19035
Bug: 541425
Change-Id: I85e1df6ebb8a94953a912d9b2b8a7b5bdfbd608a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate Orbit to S20190501151401 for 2019-06 M2 60/141660/1
Matthias Sohn [Mon, 6 May 2019 13:10:42 +0000 (15:10 +0200)]
Update Orbit to S20190501151401 for 2019-06 M2

Change-Id: Ice7ba783c1836682d237e7b50bded90ceaa8b564
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpgrade maven-compiler-plugin to 3.8.1 10/141610/4
David Pursehouse [Sun, 5 May 2019 05:42:23 +0000 (14:42 +0900)]
Upgrade maven-compiler-plugin to 3.8.1

Change-Id: I40c9b637f8a877764e48bbfc8255d4e406f62468
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade surefire plugins version to 2.22.2 09/141609/3
David Pursehouse [Sun, 5 May 2019 05:40:23 +0000 (14:40 +0900)]
Upgrade surefire plugins version to 2.22.2

Change-Id: I5ee3eebc54789ffaf87964446591e5d65cca6b93
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUse integer depth in PackWriter's DepthAwareVisitationPolicy 48/141548/2
Matthias Sohn [Thu, 2 May 2019 22:23:01 +0000 (00:23 +0200)]
Use integer depth in PackWriter's DepthAwareVisitationPolicy

- ObjectWalk.getTreeDepth() returns int hence there is no need to use
long depths in the lowestDepthVisited map.
- Also fix boxing warnings introduced in 0a15cb3a.

Change-Id: I6d73b6f41d5d20975d02f376c8588e411eaff0ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpgrade Tycho to 1.4.0 for eclipse build 92/140692/2
Michael Keppler [Tue, 16 Apr 2019 15:43:24 +0000 (16:43 +0100)]
Upgrade Tycho to 1.4.0 for eclipse build

Change-Id: I8893be53a5b45e1f4c177ff002b94c887576f128
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
5 years agoSubmoduleWalk#forPath: Clarify that caller must close returned instance 73/140573/5
David Pursehouse [Sun, 14 Apr 2019 23:19:43 +0000 (08:19 +0900)]
SubmoduleWalk#forPath: Clarify that caller must close returned instance

Change-Id: I25e7913a78c23c030a8c568975ee1044a9973517
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoConfigConstants: Fix quoting of section names in javadocs 60/140460/6
David Pursehouse [Fri, 12 Apr 2019 00:51:11 +0000 (09:51 +0900)]
ConfigConstants: Fix quoting of section names in javadocs

Replace:

 in the "core section"
 in the "diff section"
 in the "merge section"

with:

 in the "core" section
 in the "diff" section
 in the "merge" section

Change-Id: Ided7bf73e9c8aae4fc4e43d5d5b9f6d7e3066f0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUpgrade maven-pmd-plugin to 3.12.0 36/140936/3
David Pursehouse [Mon, 22 Apr 2019 10:43:02 +0000 (19:43 +0900)]
Upgrade maven-pmd-plugin to 3.12.0

Change-Id: I5ae0f0573aae3da3789fecdad494a2dd243e780b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoSilence API errors and add missing @since tags caused by 175e6654 01/141301/3
Matthias Sohn [Sun, 28 Apr 2019 21:34:04 +0000 (23:34 +0200)]
Silence API errors and add missing @since tags caused by 175e6654

Change-Id: If55acad84015f988f1e974bc19c426828b98822b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.3' 81/141281/3
Matthias Sohn [Sat, 27 Apr 2019 23:09:55 +0000 (01:09 +0200)]
Merge branch 'stable-5.3'

* stable-5.3:
  Prepare 5.3.2-SNAPSHOT builds
  JGit v5.3.1.201904271842-r
  Prepare 5.2.3-SNAPSHOT builds
  JGit v5.2.2.201904231744-r
  Revert 4678f4b and provide another solution for bug 467631
  Apache MINA sshd: make sendKexInit() work also for re-keying
  Prepare 5.1.8-SNAPSHOT builds
  JGit v5.1.7.201904200442-r
  ObjectUploadListener: Add callback interface
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I8a8671f7767444a77b809bd66a27d776c8332736
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.3.2-SNAPSHOT builds 80/141280/1
Matthias Sohn [Sat, 27 Apr 2019 22:54:08 +0000 (00:54 +0200)]
Prepare 5.3.2-SNAPSHOT builds

Change-Id: Iedd56602acc89783387098c7f92ce0e5bad091e0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.1.201904271842-r 79/141279/1 v5.3.1.201904271842-r
Matthias Sohn [Sat, 27 Apr 2019 22:41:59 +0000 (00:41 +0200)]
JGit v5.3.1.201904271842-r

Change-Id: If3c323acfd2b6933f7d4fbec480cd4e82224f701
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 77/141277/2
Matthias Sohn [Sat, 27 Apr 2019 22:21:16 +0000 (00:21 +0200)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.2.3-SNAPSHOT builds
  JGit v5.2.2.201904231744-r
  Revert 4678f4b and provide another solution for bug 467631
  Apache MINA sshd: make sendKexInit() work also for re-keying
  Prepare 5.1.8-SNAPSHOT builds
  JGit v5.1.7.201904200442-r
  ObjectUploadListener: Add callback interface
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: Ie7e572ac7e346f21fe0c387d7448be168a9c127a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years ago[releng] Update the japicmp baseline to 5.3.0.201903130848-r 50/140950/2
Thomas Wolf [Mon, 22 Apr 2019 18:28:19 +0000 (20:28 +0200)]
[releng] Update the japicmp baseline to 5.3.0.201903130848-r

Change-Id: Ie69cc0885317705aaee7d107875e6aa9f430b5eb
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoUpdate target platform, maven and bazel builds to JSch 0.1.55 23/141023/2
Thomas Wolf [Mon, 22 Apr 2019 15:21:06 +0000 (17:21 +0200)]
Update target platform, maven and bazel builds to JSch 0.1.55

Same version as used in the latest Eclipse platform. Updating the
JGit target platform results in the new JSch version being included
in the JGit feature in the p2 repo, and thus ultimately in the EGit
update site.

CQ: 19588
Bug: 546130
Change-Id: Id7e4318096f6f29dc4573e15542abdf54582af34
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoPrepare 5.2.3-SNAPSHOT builds 25/141025/1
Matthias Sohn [Tue, 23 Apr 2019 22:04:44 +0000 (00:04 +0200)]
Prepare 5.2.3-SNAPSHOT builds

Change-Id: I6ae3db901d986467128326073d4ba70406ae8385
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.2.2.201904231744-r 24/141024/1 v5.2.2.201904231744-r
Matthias Sohn [Tue, 23 Apr 2019 21:43:50 +0000 (23:43 +0200)]
JGit v5.2.2.201904231744-r

Change-Id: I4ed2aff28bff702a8c1b42814acb04c7ef9025a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoRevert 4678f4b and provide another solution for bug 467631 42/138442/3
Thomas Wolf [Sun, 10 Mar 2019 17:02:54 +0000 (18:02 +0100)]
Revert 4678f4b and provide another solution for bug 467631

Making gitlinks and folders match in a tree walk was the wrong
approach to fix bug 467631. The problem is that in such a conflict
the tree walk may then not descend into the folder.

Revert the changes to Paths.java and PathsTest.java from commit
4678f4b. Instead test for the problem case from bug 467631 explicitly
in IndexDiff. Add Daniel's test case from bug 545162, and add yet
another test case for DiffEntry.scan() that covers the problem
originally reported in bug 545162.

Bug: 545162
Change-Id: Ie2214c5d5ee32ac6596b621f0f1c7b86d38fa9b7
Also-by: Daniel Veihelmann <daniel.veihelmann@gmail.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoApache MINA sshd: make sendKexInit() work also for re-keying 87/139887/3
Thomas Wolf [Tue, 2 Apr 2019 10:34:26 +0000 (12:34 +0200)]
Apache MINA sshd: make sendKexInit() work also for re-keying

The message delaying for the initial SSH messages (client
identification followed by the initial key exchange request)
was broken. sendKexInit() is _also_ called when a new key exchange
is requested. We inadvertently also re-sent the client identification
at that point, which is wrong and makes the server terminate the
connection.

Re-keying occurs from time to time during an SSH connection depending
on time, the number of messages (packets/blocks) exchanged, or the
amount of data exchanged. The net result was that for large
repositories data-intensive operations failed on the first re-keying.

Change the initial message delay such that the two messages for the
client identification and the initial key exchange can be buffered
individually while the proxy protocol is still in progress. The
AbstractClientProxyConnector can now buffer several commands, which
should also resolve bug 544715.

Bug: 545920
Change-Id: If09ee963a439b39098a0f52a1510237b428df8dd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoMerge branch 'stable-5.1' into stable-5.2 02/140902/2
Matthias Sohn [Sat, 20 Apr 2019 09:16:34 +0000 (11:16 +0200)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.8-SNAPSHOT builds
  JGit v5.1.7.201904200442-r
  ObjectUploadListener: Add callback interface
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

Change-Id: I76761002eedf360e93d0559942ebc927a40428d6
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.1.8-SNAPSHOT builds 06/140906/1
Matthias Sohn [Sat, 20 Apr 2019 08:51:17 +0000 (10:51 +0200)]
Prepare 5.1.8-SNAPSHOT builds

Change-Id: I331bbaefd42ef94673ae8565c9b2b3af9eadfda0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.1.7.201904200442-r 04/140904/1 v5.1.7.201904200442-r
Matthias Sohn [Sat, 20 Apr 2019 08:42:58 +0000 (10:42 +0200)]
JGit v5.1.7.201904200442-r

Change-Id: Ifaa3a88c5e117912a8c691b8b8369dd9a17faebb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoObjectUploadListener: Add callback interface 46/140646/4
David Pursehouse [Tue, 16 Apr 2019 04:12:15 +0000 (13:12 +0900)]
ObjectUploadListener: Add callback interface

The callback interface is invoked after object upload was
completed.

Change-Id: I705d8becaf4f35188caf098aa75cff8963d64a60
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 99/140899/2
Matthias Sohn [Fri, 19 Apr 2019 10:40:27 +0000 (12:40 +0200)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Prepare 4.11.9-SNAPSHOT builds
  JGit v4.11.8.201904181247-r
  Prepare 4.9.11-SNAPSHOT builds
  JGit v4.9.10.201904181027-r
  Prepare 4.7.10-SNAPSHOT builds
  JGit v4.7.9.201904161809-r
  Prepare 4.5.8-SNAPSHOT builds
  JGit v4.5.7.201904151645-r
  Remember the cause for invalidating a packfile
  Fix API problem filters
  Fix pack files scan when filesnapshot isn't modified

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