]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoMerge remote-tracking branch 'origin/stable-5.0' 27/127227/1
Thomas Wolf [Thu, 9 Aug 2018 10:03:45 +0000 (12:03 +0200)]
Merge remote-tracking branch 'origin/stable-5.0'

* stable-5.0:
  Ensure that JSch knows HostKeyAlgorithms ssh-rsa and ssh-dss

Change-Id: I76899a1f6b3d9348d138266e05e1320b7429bfd1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoEnsure that JSch knows HostKeyAlgorithms ssh-rsa and ssh-dss 87/127187/1
Thomas Wolf [Wed, 8 Aug 2018 11:36:35 +0000 (13:36 +0200)]
Ensure that JSch knows HostKeyAlgorithms ssh-rsa and ssh-dss

Without these registrations, JSch's up-front checks which algorithms
are available at all fail if the ssh config explicitly sets only these
algorithms.

Bug: 537790
Change-Id: Idb0431190a7f101913363ee95af6c8fcbda6c923
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFix API breakage introduced by da254106 72/127172/5
Matthias Sohn [Tue, 7 Aug 2018 19:33:24 +0000 (21:33 +0200)]
Fix API breakage introduced by da254106

Use org.eclipse.jgit.errors.CancelledException which is a subclass of
IOException instead of org.eclipse.jgit.api.errors.CanceledException in
order to avoid breaking API. We can reconsider this with the next major
version 6.0.

Bug: 536324
Change-Id: Ia6f84f59aa6b7d78b8fccaba24ade320a54f7458
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoAbort rename detection in a timely manner if cancelled 42/126742/7
Matthias Sohn [Sat, 21 Jul 2018 19:50:30 +0000 (21:50 +0200)]
Abort rename detection in a timely manner if cancelled

If progress monitor is cancelled break loops in rename detection by
throwing a CanceledException.

Bug: 536324
Change-Id: Ia3511fb749d2a5d45005e72c156b874ab7a0da26
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRebaseCommand: Remove unnecessary fall through comments 67/127067/1
Jonathan Nieder [Sat, 4 Aug 2018 21:00:26 +0000 (14:00 -0700)]
RebaseCommand: Remove unnecessary fall through comments

It's easier to read a list of cases

case A:
case B:
case C:
... do something ...;
break;

without intervening "// fall through" lines separating the cases.

This also makes it clearer that JGit uses "$FALL-THROUGH$", not "fall
through", to suppress fallthrough warnings in switch statements.
Eclipse does not pay attention to the second comment style.

Change-Id: I5279a727aee2868854d06bfcaac8cb8186b4299e
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-5.0' 63/126863/1
Matthias Sohn [Wed, 1 Aug 2018 00:02:05 +0000 (02:02 +0200)]
Merge branch 'stable-5.0'

* stable-5.0:
  Prepare 5.0.3-SNAPSHOT builds
  JGit v5.0.2.201807311906-r
  Prepare 4.11.2-SNAPSHOT builds
  JGit v4.11.1.201807311124-r
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: Ic8a748dbd02187fd783478b702c5795d88e7fe20
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 5.0.3-SNAPSHOT builds 62/126862/1
Matthias Sohn [Tue, 31 Jul 2018 23:30:05 +0000 (01:30 +0200)]
Prepare 5.0.3-SNAPSHOT builds

Change-Id: Iae9d763a65481b09af6e19b33e41375f27038357
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v5.0.2.201807311906-r 60/126860/1 v5.0.2.201807311906-r
Matthias Sohn [Tue, 31 Jul 2018 23:06:30 +0000 (01:06 +0200)]
JGit v5.0.2.201807311906-r

Change-Id: Iccb98c03a069fee85a52325e1ed22cba8b76bcd8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 59/126859/1
Matthias Sohn [Tue, 31 Jul 2018 22:57:07 +0000 (00:57 +0200)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Prepare 4.11.2-SNAPSHOT builds
  JGit v4.11.1.201807311124-r
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: I8c8ecc818205e1f5d94c02b463792ea1d72d8ba1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.11.2-SNAPSHOT builds 56/126856/1
Matthias Sohn [Tue, 31 Jul 2018 20:07:17 +0000 (22:07 +0200)]
Prepare 4.11.2-SNAPSHOT builds

Change-Id: I02630900ab131478b30abe68b2133d2c8a5a67ab
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.11.1.201807311124-r 52/126852/1 v4.11.1.201807311124-r
Matthias Sohn [Tue, 31 Jul 2018 15:31:30 +0000 (17:31 +0200)]
JGit v4.11.1.201807311124-r

Change-Id: Ic58a916d7e2c380b84690afa5e3517c6c178af8c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 51/126851/1
Matthias Sohn [Tue, 31 Jul 2018 15:21:10 +0000 (17:21 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: I5f73f240951733e8d81d634aa5340a0861936a0c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 40/126840/1
Matthias Sohn [Tue, 31 Jul 2018 15:11:29 +0000 (17:11 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.9.4-SNAPSHOT builds
  JGit v4.9.3.201807311005-r

Change-Id: Ifd4b815b0f66d44afeafa9ae77a2a714942d675d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.9.4-SNAPSHOT builds 38/126838/1
Matthias Sohn [Tue, 31 Jul 2018 14:57:13 +0000 (16:57 +0200)]
Prepare 4.9.4-SNAPSHOT builds

Change-Id: Ibb2ee9d00d5d049f681e1abbb449656105e553a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.9.3.201807311005-r 36/126836/1 v4.9.3.201807311005-r
Matthias Sohn [Tue, 31 Jul 2018 14:05:49 +0000 (16:05 +0200)]
JGit v4.9.3.201807311005-r

Change-Id: I3f4f437649736c6a27e78d536344c7b31c8a0f65
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "Use project names instead of paths for the submodule name"
Jonathan Nieder [Fri, 27 Jul 2018 22:15:14 +0000 (18:15 -0400)]
Merge "Use project names instead of paths for the submodule name"

6 years agoUse project names instead of paths for the submodule name 74/126574/6
Masaya Suzuki [Tue, 24 Jul 2018 18:53:39 +0000 (11:53 -0700)]
Use project names instead of paths for the submodule name

Two submodules at the same path on different branches need not represent
the same repository, and two submodules at different paths can represent
the same one.

The C Git implementation uses the submodule name to internally manage
the submodule repositories under .git/modules. When a submodule
represents different repositories in different branches, it makes a
conflict inside .git/modules.

The current RepoCommand implementation uses submodule paths as the
submodule names. When the manifest file mounts different repositories to
the same path in different branches, this makes a situation described
above. To solve this issue, we can use the project name instead of
the path as the submodule name.

On the other hand, since repo v1.12.8~3^2 (repo: Support multiple
branches for the same project., 2013-10-11), a manifest file can mount
the same project to different paths. If we naively use the project
name as the submodule name, it makes a conflict in .git/modules, too.

This patch uses the project name as the submodule name basically, but
when the same project is mounted to different paths, it uses the project
name and path as the submodule name.

Change-Id: I09dc7d62ba59016fe28852d3139a56ef7ef49b8f
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Reported-by: JP Sugarbroad <jpsugar@google.com>
6 years agoMerge branch 'stable-5.0' 02/126702/1
Matthias Sohn [Fri, 27 Jul 2018 12:16:42 +0000 (14:16 +0200)]
Merge branch 'stable-5.0'

* stable-5.0:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I9717444c42ea89195dfcde8bb10121b9bb178e87
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 01/126701/1
Matthias Sohn [Fri, 27 Jul 2018 12:06:14 +0000 (14:06 +0200)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I780d4a1624fbb97a2acdf5321b9c3244b0626444
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 99/126699/1
Matthias Sohn [Fri, 27 Jul 2018 11:38:21 +0000 (13:38 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I2b44d862869d4453c57db668fc7c925da591f671
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 93/126693/1
Matthias Sohn [Fri, 27 Jul 2018 09:03:11 +0000 (11:03 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: Ie7029bc91621af32e7bfd2e0d76a424b991b1995
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 92/126692/1
Matthias Sohn [Fri, 27 Jul 2018 08:51:58 +0000 (10:51 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: I6ab2b951dd94a9fc1c4f5283847a3e2ec37d0895
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 34/126634/2
David Pursehouse [Fri, 27 Jul 2018 07:22:51 +0000 (08:22 +0100)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Prepare 4.7.3-SNAPSHOT builds
  JGit v4.7.2.201807261330-r
  Delete all loose refs empty directories
  Use java.nio to delete path to get detailed errors
  GC: Remove empty references folders
  Do not ignore path deletion errors

Change-Id: Iadc8275fbaa3d6f7d08a96ab66d49f392f6aab78
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "ErrorProne: Enable check for misuse of ExpectedException"
David Pursehouse [Fri, 27 Jul 2018 05:53:59 +0000 (01:53 -0400)]
Merge "ErrorProne: Enable check for misuse of ExpectedException"

6 years agoPrepare 4.7.3-SNAPSHOT builds 85/126685/1
Matthias Sohn [Thu, 26 Jul 2018 23:00:35 +0000 (01:00 +0200)]
Prepare 4.7.3-SNAPSHOT builds

Change-Id: I5c437f45d5bc469e3c32bef1180c127d96d24d23
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.7.2.201807261330-r 75/126675/1 v4.7.2.201807261330-r
Matthias Sohn [Thu, 26 Jul 2018 17:28:38 +0000 (19:28 +0200)]
JGit v4.7.2.201807261330-r

Change-Id: I0d8c7ca756e6236e315c91da000fe8103ce83d05
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoDelete all loose refs empty directories 55/125755/4
Luca Milanesio [Sat, 7 Jul 2018 22:35:20 +0000 (23:35 +0100)]
Delete all loose refs empty directories

Remove completely the empty directories under refs/<namespace>
including the first level partition of the changes, when they are
completely empty.

Bug: 536777
Change-Id: I88304d34cc42435919c2d1480258684d993dfdca
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUse java.nio to delete path to get detailed errors 54/125754/4
Luca Milanesio [Sat, 7 Jul 2018 22:09:36 +0000 (23:09 +0100)]
Use java.nio to delete path to get detailed errors

Get the full IOException of the reason why a directory
cannot be removed during GC.

Change-Id: Ia555bce009fa48087a73d677f1ce3b9c0b685b57
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "Send only 1 flush pkt at the end of v2 fetch"
Jonathan Nieder [Tue, 24 Jul 2018 22:56:42 +0000 (18:56 -0400)]
Merge "Send only 1 flush pkt at the end of v2 fetch"

6 years agoSend only 1 flush pkt at the end of v2 fetch 80/126580/1
Jonathan Tan [Tue, 24 Jul 2018 22:35:16 +0000 (15:35 -0700)]
Send only 1 flush pkt at the end of v2 fetch

When processing a fetch using protocol v2, UploadPack#fetchV2 sends an
extraneous flush pkt when also sending a packfile (#sendPack sending its
own flush pkt). Update that method to only send the flush pkt if the
packfile is not being sent.

Change-Id: I7117a264bccd2d7f3a048645fcb8425a9d78d526
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
6 years agoFix NPE in BlameGenerator.getSourceStart() 18/126518/1
Matthias Sohn [Mon, 23 Jul 2018 21:07:23 +0000 (23:07 +0200)]
Fix NPE in BlameGenerator.getSourceStart()

Bug: 499543
Change-Id: I99f6ebb1c3ceea20e8ca093acbe824c9f0362d45
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoErrorProne: Enable check for misuse of ExpectedException 44/126144/2
David Pursehouse [Tue, 17 Jul 2018 01:43:04 +0000 (10:43 +0900)]
ErrorProne: Enable check for misuse of ExpectedException

Any additional statements after the statement that is expected to
throw will never be executed in a passing test. This can lead to
inappropriately passing tests where later incorrect assertions are
skipped by the thrown exception. See [1] for examples.

There are no cases of this in the code base, but by enabling the
checker with severity ERROR we can ensure that we don't overlook
any future misuse of ExpectedException.

[1] http://errorprone.info/bugpattern/ExpectedExceptionChecker

Change-Id: I266d4f73f6075bfc1e39fa3d8aee7dee96db61b9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoHttpClientConnection.getHeaderFields should support multiple values for same header 97/126297/7
Gabriel Couto [Thu, 19 Jul 2018 05:34:56 +0000 (05:34 +0000)]
HttpClientConnection.getHeaderFields should support multiple values for same header

Bug: 537166
Change-Id: I1ba645968efe01a88f2484f030b7572228ba169c
Signed-off-by: Gabriel Couto <gmcouto@gmail.com>
6 years agoAlways send refs' objects despite "filter" in pack 48/126048/2
Jonathan Tan [Thu, 12 Jul 2018 17:58:28 +0000 (10:58 -0700)]
Always send refs' objects despite "filter" in pack

In a0c9016abd ("upload-pack: send refs' objects despite "filter"",
2018-07-09), Git updated the "filter" option in the fetch-pack
upload-pack protocol to not filter objects explicitly specified in
"want" lines, even if they match the criterion of the filter. Update
JGit to match that behavior.

Change-Id: Ia4d74326edb89e61062e397e05483298c50f9232
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
6 years agoRepoCommand: record remote branch, group, shallow bit by default 59/126359/1
Jonathan Nieder [Fri, 20 Jul 2018 07:48:22 +0000 (00:48 -0700)]
RepoCommand: record remote branch, group, shallow bit by default

Propagating more information from the manifest to the superproject
tends to work out well.  These particular settings mean:

Recording the remote branch in .gitmodules allows
- "git submodule update --remote" to fetch the right branch
- Gerrit's submodule subscription feature to subscribe from the
  right branch, if requested

Recording groups in .gitattributes allows commands like "git clone
--recurse-submodules=:(attr:platform-linux) $superproject" to clone
the correct set of projects.

Recording the shallow bit in .gitmodules means that "git clone
--recurse-submodules" will use shallow clone in submodules where that
was requested in the manifest.

Gerrit's supermanifest plugin records the remote branch and shallow
bit by default already, and most users of that plugin configure it to
record groups in .gitattributes as well, so for most users this will
be a no-op.

Change-Id: Id2ed47cbca5ce822bde517494673c86ab8c58da9
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge "Ensure RacyGitTests don't raise false negatives"
Jonathan Nieder [Fri, 20 Jul 2018 07:25:26 +0000 (03:25 -0400)]
Merge "Ensure RacyGitTests don't raise false negatives"

6 years agoResolveMerger: don't try needlessly to delete directories 22/126222/4
Thomas Wolf [Wed, 18 Jul 2018 07:47:32 +0000 (09:47 +0200)]
ResolveMerger: don't try needlessly to delete directories

Don't try to delete folders if the merger chooses THEIRS, but all of
BASE, OURS, and THEIRS contain the folder.

Add a test for rebase with auto-stash and subdirectories that
verifies this case. The needless directory deletion and reporting
such directories in getModifiedFiles() was the root cause of bug
536880.

Note even with this fix, bug 536880 will not be fixed in all cases
yet. There may still be cases where the set of modified files ends
up containing directories. This will be dealt with in EGit where
this set is used. (See https://git.eclipse.org/r/#/c/126242/ .)

Bug: 536880
Change-Id: I62b4571a1c1d4415934a6cb4270e0c8036deb2e9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoEnsure RacyGitTests don't raise false negatives 60/126160/1
Christian Halstrick [Tue, 17 Jul 2018 10:00:04 +0000 (12:00 +0200)]
Ensure RacyGitTests don't raise false negatives

RacyGitTests depend on filesystem timer resolution. We wait for a file
system timer tick, remember that time as t1, modify a file and assume
that this file has a lastmodified of t1.

If this assumption is not fulfilled then ignore the test result.

Bug: 526111
Change-Id: Ia38b7d2f99171ef54b8f9fe5be343cf9fcfd3971

6 years agoGC: Trim more EWAHCompressedBitmaps to free unused memory 42/126142/2
Terry Parker [Mon, 16 Jul 2018 20:58:30 +0000 (13:58 -0700)]
GC: Trim more EWAHCompressedBitmaps to free unused memory

04b9f4436 fixed places where compressed bitmaps were holding on to their
full buffers, but missed this StoredBitmap.getBitmap() case where a
bitmap is resonstituted from an xor chain.

Change-Id: I7cf75d9e49c18a1a8a880a4df7e821502edc68a4
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoAdd API to specify the submodule name 87/125987/3
Masaya Suzuki [Thu, 12 Jul 2018 15:32:32 +0000 (08:32 -0700)]
Add API to specify the submodule name

Currently SubmoduleAddCommand always uses the path as submodule name.
This patch lets the caller specify a submodule name.

SubmoduleUpdateCommand still does not make use of the submodule name
(see bug 535027) but Git does.  To avoid triggering CVE-2018-11235,
do some validation on the name to avoid '..' path components.

[jn: fleshed out commit message, mostly to work around flaky CI]

Change-Id: I6879c043c6d7973556e2080387f23c246e3d76a5
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMake Reftable seek* and has* method names more consistent 08/125908/7
Minh Thai [Tue, 10 Jul 2018 19:41:23 +0000 (12:41 -0700)]
Make Reftable seek* and has* method names more consistent

Make the method names more consistent and their semantics simpler:
hasRef and seekRef to look up a single exact reference by name and
hasRefsByPrefix and seekRefsByPrefix to look up multiple references by
name prefix.

In particular, splitting hasRef into two separate methods for its
different uses makes DfsReftableDatabase.isNameConflicting easier to
follow.

[jn: fleshed out commit message]

Change-Id: I71106068ff3ec4f7e14dd9eb6ee6b5fab8d14d0b
Signed-off-by: Minh Thai <mthai@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoSeek references by prefix in reftable 98/125898/4
Minh Thai [Tue, 10 Jul 2018 19:41:23 +0000 (12:41 -0700)]
Seek references by prefix in reftable

Reftable implementation of RefDatabase.getRefsByPrefix() should be
more performant, as references are filtered directly by prefix;
instead of fetching the whole subtree then filter by prefix.

Change-Id: If4f5f8c08285ea1eaec9efb83c3d864cea7a1321
Signed-off-by: Minh Thai <mthai@google.com>
6 years agoGC: Trim EWAHCompressedBitmaps to free unused memory 48/125848/3
Terry Parker [Tue, 10 Jul 2018 00:42:21 +0000 (17:42 -0700)]
GC: Trim EWAHCompressedBitmaps to free unused memory

The "Building bitmaps" GC phase fails for large repositories (repos with
10M objects use 1.25MB per uncompressed bitmap, and those with long
histories may build >25k bitmaps). Since these bitmaps xor well against
each other, the actual space needed for each compressed bitmap is
usually no more than a few KB. Calling trim() will ensure we aren't
holding on to excess memory.

Change-Id: I40bf78c730b9f6051da6025f9777ce27220a5b0a
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoMerge "Add progress monitor step to first phase of GC commit selection"
Terry Parker [Tue, 10 Jul 2018 15:23:38 +0000 (11:23 -0400)]
Merge "Add progress monitor step to first phase of GC commit selection"

6 years agoMake DfsConfig public 77/124777/3
Dave Borowitz [Wed, 20 Jun 2018 12:48:37 +0000 (08:48 -0400)]
Make DfsConfig public

This may be convenient for downstream implementers who require a dummy
StoredConfig implementation, rather than making them reimplement the two
abstract StoredConfig methods.

Change-Id: I2b7bc6250d722c2b95d9f99e4eff1e5bf97cb567

6 years agoGC: Remove empty references folders 47/125747/4
Hector Caballero [Mon, 5 Feb 2018 13:58:46 +0000 (08:58 -0500)]
GC: Remove empty references folders

After packaging references, the folders containing these references are
not deleted. In a busy repository, this causes operations to slow down
as traversing the references tree becomes longer.

Delete empty reference folders after the loose references have been
packed.
To avoid deleting a folder that was just created by another concurrent
operation, only delete folders that were not modified in the last 30
seconds.

Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: Ie79447d6121271cf5e25171be377ea396c7028e0
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdd progress monitor step to first phase of GC commit selection 47/125847/2
Terry Parker [Mon, 2 Jul 2018 23:17:44 +0000 (16:17 -0700)]
Add progress monitor step to first phase of GC commit selection

Change-Id: I10e3d53de5e2b1fc1be9a59b236da5780473d841
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoDo not ignore path deletion errors 67/125767/1
Luca Milanesio [Sun, 8 Jul 2018 22:41:00 +0000 (23:41 +0100)]
Do not ignore path deletion errors

Log as warning when an attempt to remove a directory
fails. This helps troubleshooting some bugs like the GC leaving
behind empty directories.

Change-Id: Idb94ce17f8be9668a970c7ecae31436bf434073c
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
6 years agoMerge branch 'stable-5.0' 87/125487/1
David Pursehouse [Wed, 4 Jul 2018 05:16:45 +0000 (14:16 +0900)]
Merge branch 'stable-5.0'

* stable-5.0:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: I8e6d0c92144db3bf57ea05f93852ac015458260b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 86/125486/2
David Pursehouse [Wed, 4 Jul 2018 05:12:14 +0000 (14:12 +0900)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: I40b7b4b3fd6d53bbad32f8f550e885c0e698faf1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 85/125485/1
David Pursehouse [Wed, 4 Jul 2018 05:11:06 +0000 (14:11 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: I2f02298d0ff7caafeca4020cde4fdfa29a46e585
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 84/125484/1
David Pursehouse [Wed, 4 Jul 2018 05:10:24 +0000 (14:10 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: Ibd8f2a041b0de6e008a1ea84b92823f8cbc6e3d2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 83/125483/1
David Pursehouse [Wed, 4 Jul 2018 05:09:48 +0000 (14:09 +0900)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: Id6a85804695d5dcb32f26ed1d861b7c93577c5e4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 82/125482/1
David Pursehouse [Wed, 4 Jul 2018 05:08:56 +0000 (14:08 +0900)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  ResolveMerger: Fix encoding with string; use bytes

Change-Id: If17328fbd101d596a8a16d9c4a190e9b6e120902
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdd response message, if any, on HTTP status 404 57/125357/3
Thomas Wolf [Tue, 3 Jul 2018 06:46:12 +0000 (08:46 +0200)]
Add response message, if any, on HTTP status 404

Try to give as much information as possible. The connection's
response message might contain additional hints as to why the
connection could not be established.

Bug: 536541
Change-Id: I7230e4e0be9417be8cedeb8aaab35186fcbf00a5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoUpgrade spotbugs-maven-plugin to 3.1.5 55/124655/4
David Pursehouse [Mon, 18 Jun 2018 06:51:47 +0000 (15:51 +0900)]
Upgrade spotbugs-maven-plugin to 3.1.5

Change-Id: I00e255adb3e14f4046f7eeb4fcc2a344bb7bda9d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "Return parsed objects from TestRepository.commit/tree/blob()"
Terry Parker [Fri, 29 Jun 2018 00:28:56 +0000 (20:28 -0400)]
Merge "Return parsed objects from TestRepository.commit/tree/blob()"

6 years agoReturn parsed objects from TestRepository.commit/tree/blob() 65/125065/6
Terry Parker [Wed, 27 Jun 2018 00:22:07 +0000 (17:22 -0700)]
Return parsed objects from TestRepository.commit/tree/blob()

It is convenient for TestRepository to return fully parsed
objects from its commit()/tree()/blob() methods, so that test
code doesn't have to remember to parse them before making
assertions about them.

Update TestRepostiory to return fully parsed objects.
Adjust the tests that are affected by this change in behavior.

Change-Id: I09d03d0c80ad22cb7092f4a2eaed99d40a10af63
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoUpdate .mailmap 66/125066/1
David Pursehouse [Wed, 27 Jun 2018 04:42:29 +0000 (13:42 +0900)]
Update .mailmap

Change-Id: I9bd776e3d1ae120d56d6ee2f8eec9a5d80aa38cc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCorrectly handle initialization of shallow commits 64/125064/3
Terry Parker [Tue, 26 Jun 2018 23:44:01 +0000 (16:44 -0700)]
Correctly handle initialization of shallow commits

In a new RevWalk, if the first object parsed is one of the
shallow commits, the following happens:
1) RevCommit.parseCanonical() is called on a new "r1" RevCommit.
2) RevCommit.parseCanonical() immediately calls
   RevWalk.initializeShallowCommits().
3) RevWalk.initializeShallowCommits() calls lookupCommit(id),
   creating and adding a new "r2" version of this same object and
   marking its parents empty.
4) RevCommit.parseCanonical() initializes the "r1" RevCommit's
   fields, including the parents.
5) RevCommit.parseCanonical()'s caller uses the "r1" commit that
   has parents, losing the fact that it is a shallow commit.

This change passes the current RevCommit as an argument to
RevWalk.initializeShallowCommits() so that method can set its
parents empty rather than creating the duplicate "r2" commit.

Change-Id: I67b79aa2927dd71ac7b0d8f8917f423dcaf08c8a
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoMerge changes Ib6019b10,I82c71b52
Terry Parker [Tue, 26 Jun 2018 16:29:11 +0000 (12:29 -0400)]
Merge changes Ib6019b10,I82c71b52

* changes:
  Fix a GC scalability issue when selecting commit bitmaps
  Test uniform bitmap commit selection across multiple branches

6 years agoFix a GC scalability issue when selecting commit bitmaps 55/124955/5
tparker [Mon, 25 Jun 2018 03:00:55 +0000 (20:00 -0700)]
Fix a GC scalability issue when selecting commit bitmaps

The previous algorithm selected commits by creating bitmaps at
each branch tip, doing a revwalk to populate each bitmap, and
looping in this way:
1) Select the remaining branch with the most commits (the branch
   whose bitmap has the highest cardinality)
2) Select well-spaced bitmaps in that branch
3) Remove commits in the selected branch from the remaining
   branch-tip bitmaps
4) Repeat at #1

This algorithm gave good commit selection on all branches but
a more uniform selection on "important" branches, where branch
length is the proxy for "important". However the algorithm
required N bitmaps of size M solely for the purpose of commit
selection, where N is the number of branch tips in the primary
GC pack, and M is the number of objects in the pack.

This new algorithm uses branch modification date as the proxy for
"important" branches, replacing the N*M memory allocation with a
single M-sized bitmap and N revwalks from new branch tips to
shared history (which will be short when there is a lot of shared
history).

GcCommitSelectionTest.testDistributionOnMultipleBranches verifies
that this algorithm still yields good coverage on all branches.

Change-Id: Ib6019b102b67eabb379e6b85623e4b5549590e6e
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoTest uniform bitmap commit selection across multiple branches 54/124954/5
tparker [Fri, 22 Jun 2018 23:10:11 +0000 (16:10 -0700)]
Test uniform bitmap commit selection across multiple branches

Test that the commit selection algorithm provides appropriate
coverage across all branches.

Change-Id: I82c71b52068f01e8cef2398aecfec8e144d9a68b
Signed-off-by: Terry Parker <tparker@google.com>
6 years agoCleanCommand: don't fire WorkingTreeModifiedEvent on dry run 02/125002/1
Thomas Wolf [Tue, 26 Jun 2018 06:24:12 +0000 (08:24 +0200)]
CleanCommand: don't fire WorkingTreeModifiedEvent on dry run

Since no files are actually deleted it makes no sense to fire such an
event.

Change-Id: I66e87afc1791f27fddaa873bafe8bb8b61662535
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoMerge branch 'stable-5.0' 37/124937/1
Matthias Sohn [Sat, 23 Jun 2018 22:19:47 +0000 (00:19 +0200)]
Merge branch 'stable-5.0'

* stable-5.0:
  Prepare 5.0.2-SNAPSHOT builds
  JGit v5.0.1.201806211838-r
  Add project-info reports to maven site
  Fix maven site generation failing with javadoc errors

Change-Id: Iedbc4c777a6e724f487419e187e25cf7e3aa55d6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 23/124923/1
David Pursehouse [Sat, 23 Jun 2018 04:56:50 +0000 (13:56 +0900)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:

Empty merge because of previous merge from stable-4.9 into
stable-5.0 and commits subsequently merged into stable-4.10
and stable-4.11.

Change-Id: I69b8d3e96173ef58b77186dfe462148075954ce4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 68/124868/1
David Pursehouse [Fri, 22 Jun 2018 02:14:09 +0000 (11:14 +0900)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I9902553ac442821416912d26a5d6ee1b0dc41cf4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPrepare 5.0.2-SNAPSHOT builds 65/124865/1
Matthias Sohn [Thu, 21 Jun 2018 23:42:14 +0000 (01:42 +0200)]
Prepare 5.0.2-SNAPSHOT builds

Change-Id: I65e83f39a4082278c4cb809dbb08d44a119cebe0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v5.0.1.201806211838-r 64/124864/1 v5.0.1.201806211838-r
Matthias Sohn [Thu, 21 Jun 2018 22:40:01 +0000 (00:40 +0200)]
JGit v5.0.1.201806211838-r

Change-Id: I594cd85d46698953c27da3687e4ec40aeb73b445
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoResolveMerger: Fix encoding with string; use bytes 60/124860/1
Marco Miller [Thu, 21 Jun 2018 18:18:48 +0000 (14:18 -0400)]
ResolveMerger: Fix encoding with string; use bytes

This change fixes the issue [1]. Before this fix, a merge involving
the caching of consecutive yet similar filenames with Norwegian
characters [2] used to throw an IllegalStateException: Duplicate
stages not allowed. This was caused by inaccurate decoding of the
filenames, using string values assuming default encoding. In the
toString method of DirCacheEntry, used before through getPathString,
UTF-8 encoding is used, but the end result becomes default encoding,
through Object's default toString usage. The special characters in
those two consecutive (particular) filenames [2] were becoming the
very same decoded /single character, lending consecutive -but then
identical- filenames. Thus the perceived duplicate 0-staging of the
file(s).

Replace getPathString usage with getRawPath for this specific case,
or use byte array representations of cached entries instead of string.

Adding a test for this change is not possible, as there is no known
way to change the default encoding for filenames such as [2] (e.g.).
JGitTestUtil does write file contents through UTF-8, but encoding like
so does not apply to the actual file name. Hence there is no way to
create files with names properly made of special characters such as
[2]'s. And the test that is necessary for this case assumes such
Norwegian (or similar characters) filenames. Changing the default
locale programmatically in a test has no effect either. And changing
the LANG value passed to the JVM is only possible upon starting it.

[1] https://bugs.chromium.org/p/gerrit/issues/detail?id=9153

[2] <=>
(...)
"a/b/SíÒr-Norge.map",
"a/b/Sør-Norge.map",
(...)

Change-Id: Ib9f2f5297932337c9817064cc09d9f774dd168f4
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
6 years agoAdd project-info reports to maven site 29/124829/2
Matthias Sohn [Thu, 21 Jun 2018 05:47:17 +0000 (07:47 +0200)]
Add project-info reports to maven site

Change-Id: I290d9c4a27d2ca1b9071f39639195e0d85799c00
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix maven site generation failing with javadoc errors 28/124828/1
Matthias Sohn [Thu, 21 Jun 2018 05:48:29 +0000 (07:48 +0200)]
Fix maven site generation failing with javadoc errors

The same errors are suppressed when generating javadoc.
Suppress the errors during site generation.

Change-Id: I83bd1c10e5de82f47c351e7edf2c9230be4b1f21
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 07/124807/1
David Pursehouse [Thu, 21 Jun 2018 07:17:38 +0000 (16:17 +0900)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I5f256aa6117847a25ab9e15c7d7ccc51e43cbb64
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-5.0' 05/124805/1
Jonathan Nieder [Thu, 21 Jun 2018 04:23:49 +0000 (21:23 -0700)]
Merge branch 'stable-5.0'

* stable-5.0:
  Respect "unshallow" lines in protocol v2
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I14bd522d2f6bafb1b41e3c730d6dbef827e3e88a
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoRespect "unshallow" lines in protocol v2 04/124804/2
Jonathan Nieder [Thu, 21 Jun 2018 04:19:11 +0000 (21:19 -0700)]
Respect "unshallow" lines in protocol v2

If I run

 git config --global protocol.version 2
 mkdir repo
 cd repo
 git init --bare
 git remote add origin https://go.googlesource.com/proposal
 git fetch --depth=1
 git fetch --unshallow

then I expect to have a full history, just as though I had fetched
without --depth in the first place.  Instead, it reports success
but does not fetch enough objects:

 $ git fsck
 notice: HEAD points to an unborn branch (master)
 Checking object directories: 100% (256/256), done.
 Checking objects: 100% (468/468), done.
 broken link from  commit 2c6bc83f234085c8eadb7ea33405ce6223c44d1b
               to  commit 878975cf2b600675b4c905e5d9591bd24541ae9e
 missing commit 878975cf2b600675b4c905e5d9591bd24541ae9e
 dangling commit 314be00dae78dd526851f5635e6349014e2ad0c2

The false success indicates problems in the client and the server.
Git 2.18-rc2 (the client) ought to have been more defensive, noticing
the incomplete history.  The greater error is in JGit (the server),
which neglects to send the objects requested.

When serving protocol v0 requests, JGit sends the correct objects by
taking unshallowCommits into account when generating the pack to send
to the client.  Do the same in the protocol v2 code path.  I forgot to
do this in v5.0.0.201806050710-rc3~6 (Teach UploadPack shallow fetch
in protocol v2, 2018-03-15).

Reported-by: Russ Cox <rsc@golang.org>
Change-Id: I282b45f47616a641b9e8d6210b4a070d3efdbb9b
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.9' into stable-5.0 60/124760/1
David Pursehouse [Wed, 20 Jun 2018 07:09:08 +0000 (16:09 +0900)]
Merge branch 'stable-4.9' into stable-5.0

* stable-4.9:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I2db9bf014ba222d77851cc58da7ee5a0e8b344f6
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 59/124759/1
David Pursehouse [Wed, 20 Jun 2018 07:08:32 +0000 (16:08 +0900)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I318813d19445ab7c44384015d36830ed02b8b590
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 58/124758/1
David Pursehouse [Wed, 20 Jun 2018 07:07:48 +0000 (16:07 +0900)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I016c9b3ec0081542bb903f361d9a3af1ea746ae3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.6' into stable-4.7 57/124757/1
David Pursehouse [Wed, 20 Jun 2018 07:06:44 +0000 (16:06 +0900)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: Idc653c22a9af2013a4c481bb19ca8d059f5c34d0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.5' into stable-4.6 38/124738/1
David Pursehouse [Tue, 19 Jun 2018 12:41:05 +0000 (21:41 +0900)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: I2a0e0b63a06f442f5a088d4bc8bb08eaf02ce952
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTemporarily @Ignore flaky CommitCommandTest methods 32/124732/1
Dave Borowitz [Fri, 7 Jul 2017 18:43:57 +0000 (14:43 -0400)]
Temporarily @Ignore flaky CommitCommandTest methods

Change-Id: Ia2c42d014323bd29b85bf76f1a20c83f612406d7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
(cherry picked from commit e93b0026ced10c956e76daed038f2560a33b5baf)

6 years agoAvoid expensive getAllRefsByPeeledObjectId() in PlotWalk constructor 09/124609/1
Thomas Wolf [Fri, 15 Jun 2018 14:01:58 +0000 (16:01 +0200)]
Avoid expensive getAllRefsByPeeledObjectId() in PlotWalk constructor

Instead, do it when we return the first PlotCommit from next().
On a repository with many refs, getAllRefsByPeeledObjectId() can
take a while. Doing a late initialization simplifies the handling
of a PlotWalk.

EGit, for instance, creates and configures an instance, and then
does the real walk in a background job. With late initialization,
the potentially expensive getAllRefsByPeeledObjectId() also occurs
in that background job.

Bug: 485743
Change-Id: I84c020cf8f7afda6f181778786612b8e6ddd7ed8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoUpdate Maven plugins 23/124523/1
Matthias Sohn [Tue, 12 Jun 2018 16:02:22 +0000 (18:02 +0200)]
Update Maven plugins

- build-helper-maven-plugin 3.0.0
- eclipse-jarsigner-plugin 1.1.5
- jacoco-maven-plugin 0.8.1
- maven-clean-plugin 3.1.0
- maven-jar-plugin 3.1.2
- maven-pmd-plugin 3.10.0
- maven-resources-plugin 3.1.0
- maven-shade-plugin 3.1.1
- maven-site-plugin 3.7.1
- maven-surefire-plugin 2.21.0
- maven-surefire-report-plugin 2.21.0
- plexus-compiler-javac 2.8.4
- spotbugs-maven-plugin 3.1.3.1
- tycho 1.2.0 (leftover)
- wagon-ssh 3.1.0

Change-Id: I8eba2ee448437a775542ef6a7c59661727aa207c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpgrade Tycho to 1.2.0 23/124423/2
Michael Keppler [Tue, 12 Jun 2018 16:02:22 +0000 (18:02 +0200)]
Upgrade Tycho to 1.2.0

Change-Id: I2f1c81839d2d78ddfd10b3992d1145546d10fa8c
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-5.0' 03/124503/1
Matthias Sohn [Wed, 13 Jun 2018 22:00:30 +0000 (00:00 +0200)]
Merge branch 'stable-5.0'

* stable-5.0:
  Prepare 5.0.1-SNAPSHOT builds
  JGit v5.0.0.201806131550-r
  JGit v5.0.0.201806131210-r
  Downgrade Apache httpclient to 4.5.2.v20170210-0925
  RefUpdateTest: Refactor to not use deprecated Repository#getAllRefs
  Propagate failure of ssh command to caller of SshSupport
  Make JGit describe behaves same as c-git for lightweight tags
  Fix issues with LFS on GitHub (SSH)

Change-Id: I0471440919adfdbfc72996711d9e0bbd1f3cf477
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 5.0.1-SNAPSHOT builds 01/124501/1
Matthias Sohn [Wed, 13 Jun 2018 21:24:42 +0000 (23:24 +0200)]
Prepare 5.0.1-SNAPSHOT builds

Change-Id: Iadf12dbdd63ef17c3f712c0fc18495304aa35016
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v5.0.0.201806131550-r 95/124495/1 v5.0.0.201806131550-r
Matthias Sohn [Wed, 13 Jun 2018 19:42:40 +0000 (21:42 +0200)]
JGit v5.0.0.201806131550-r

Change-Id: Ia2d548676217250593c3f0c383aec19e12e5e4a4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v5.0.0.201806131210-r 79/124479/1
Matthias Sohn [Wed, 13 Jun 2018 16:11:23 +0000 (18:11 +0200)]
JGit v5.0.0.201806131210-r

Change-Id: Iedccfcaf57c11822f1faf5d5195357de42b2a14e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoDowngrade Apache httpclient to 4.5.2.v20170210-0925 46/124446/2
Matthias Sohn [Wed, 13 Jun 2018 07:03:20 +0000 (09:03 +0200)]
Downgrade Apache httpclient to 4.5.2.v20170210-0925

Eclipse platform uses this version from the Oxygen Orbit release for
Photon. In order to avoid that we end up with two slightly different
versions in the same p2 repository of the simultaneous release we
downgrade temporarily from the version 4.5.2.v20180410-1551 in the
Photon Orbit release.

See
https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg15659.html

Change-Id: Id46a840aa4b1010af7fe311498f17f1f2e5b81e0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRefUpdateTest: Refactor to not use deprecated Repository#getAllRefs 26/123126/3
David Pursehouse [Wed, 23 May 2018 04:54:52 +0000 (13:54 +0900)]
RefUpdateTest: Refactor to not use deprecated Repository#getAllRefs

Change-Id: I157e62a0e1479d4bc95ef867e616ca8a30041759
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPropagate failure of ssh command to caller of SshSupport 06/124406/4
Matthias Sohn [Tue, 12 Jun 2018 12:09:39 +0000 (14:09 +0200)]
Propagate failure of ssh command to caller of SshSupport

When SshSupport.runSshCommand fails since the executed external ssh
command failed throw a CommandFailedException.

If discovery of LFS server fails due to failure of the
git-lfs-authenticate command chain the CommandFailureException to the
LfsConfigInvalidException in order to allow root cause analysis in the
application using that.

Change-Id: I2f9ea2be11274549f6d845937164c248b3d840b2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMake JGit describe behaves same as c-git for lightweight tags 35/124435/3
Marcel Trautwein [Fri, 23 Feb 2018 06:27:52 +0000 (07:27 +0100)]
Make JGit describe behaves same as c-git for lightweight tags

JGit now considers lightweight tags only if the --tags option is set
i.e. `git.describe().setAllTags(true)` has to be set, else the default
is now as in c git:

Only annotated tags are evaluated unless you pass true
equivalent to --tags (or --all) by the option setAllTags.

Hint: This (still) doesn't address any difference between c-git
`--all` and `!--all --tags` behavior;
perhaps this might be a follow up request

Bug: 423206
Change-Id: I9a3699756df0b9c6a7c74a7e8887dea0df17c8e7
Signed-off-by: Marcel Trautwein <me+eclipse@childno.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix issues with LFS on GitHub (SSH) 55/124355/3
Markus Duft [Mon, 11 Jun 2018 15:12:00 +0000 (17:12 +0200)]
Fix issues with LFS on GitHub (SSH)

 * URIish seems to have a tiny feature (bug?). The path of the URI
   starts with a '/' only if the URI has a port set (it seems).
 * GitHub does not return SSH authorization on a single line as Gerrit
   does - need to account for that.
 * Increase the SSH git-lfs-authenticate timeout, as GitHub sometimes
   responds slower than expected.
 * Guard against NPE in case the download action does not contain any
   additional headers.

Change-Id: Icd1ead3d015479fd4b8bbd42ed42129b0abfb95c
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
6 years agoMerge branch 'stable-5.0' 74/124374/2
David Pursehouse [Tue, 12 Jun 2018 03:50:32 +0000 (12:50 +0900)]
Merge branch 'stable-5.0'

* stable-5.0:

Empty merge. The stable-4.9 branch was merged directly into stable-5.0
by [1], and then there were separate merges up through stable-4.10 to
stable-4.11 by [2] and [3].

When stable-4.11 was merged in to stable-5.0 in [4] it was an empty
merge, since the change had already been brought in by [1].

[1] https://git.eclipse.org/r/#/c/124301/-1..2
[2] https://git.eclipse.org/r/#/c/124320/-1..1
[3] https://git.eclipse.org/r/#/c/124321/-1..1
[4] https://git.eclipse.org/r/#/c/124332/-1..1

Change-Id: I91304b1bdad41837814d221971750b2b64bdcf6a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 32/124332/1
Matthias Sohn [Mon, 11 Jun 2018 09:25:27 +0000 (11:25 +0200)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:

Change-Id: Iec2dafd00979ab02f5ab698fc514866255007de5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 21/124321/1
Matthias Sohn [Mon, 11 Jun 2018 09:03:42 +0000 (11:03 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Ensure DirectoryStream is closed promptly

Change-Id: I2c0d5ea96b2c96336908674032d0f7d39dc062b9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 20/124320/1
Matthias Sohn [Mon, 11 Jun 2018 08:54:50 +0000 (10:54 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Ensure DirectoryStream is closed promptly

Change-Id: I62674a1db9266c04fb353ab697e2c0a24a7369b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-5.0' 15/124315/1
David Pursehouse [Sun, 10 Jun 2018 23:09:00 +0000 (08:09 +0900)]
Merge branch 'stable-5.0'

* stable-5.0:
  Fix Javadoc typo

Change-Id: Ib864f5871f8e99d2a776b7ae9f782ec3eb312d50
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFix Javadoc typo 08/124308/1
Michael Keppler [Sun, 10 Jun 2018 12:15:45 +0000 (14:15 +0200)]
Fix Javadoc typo

Change-Id: Ib4ebc57236bdea663f27295764886413e2550580
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-5.0' 02/124302/3
Matthias Sohn [Sun, 10 Jun 2018 10:12:05 +0000 (12:12 +0200)]
Merge branch 'stable-5.0'

* stable-5.0:
  Ensure Jsch checks all configured algorithms
  RawTextTest#testBinary: use array comparison to compare arrays
  LFS: Better SSH authentication token timeout handling
  Ensure DirectoryStream is closed promptly
  Validate branch names on branch creation

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