]> source.dussan.org Git - jgit.git/log
jgit.git
4 years agoFix javadoc typo 59/160359/1
Karsten Thoms [Thu, 2 Apr 2020 08:54:43 +0000 (10:54 +0200)]
Fix javadoc typo

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

Change-Id: Id337a320a59a77c36866f668ea1e30780bb55f35
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge "Scan through all merged reftables for max/min update indices"
Terry Parker [Mon, 23 Mar 2020 14:51:45 +0000 (10:51 -0400)]
Merge "Scan through all merged reftables for max/min update indices"

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

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

Maven build: update version in root pom.

Bazel build: update version & hash in WORKSPACE file.

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

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

Since reftables might have update index ranges that are overlapped.

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

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

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

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

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

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

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

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

Change-Id: I48b4b8366404b01e394bb2dac08e19f0eebbd759
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge "tag option for clone command"
Christian Halstrick [Sun, 15 Mar 2020 22:11:14 +0000 (18:11 -0400)]
Merge "tag option for clone command"

4 years agotag option for clone command 70/159170/3
Alexander Nittka [Wed, 11 Mar 2020 10:58:03 +0000 (11:58 +0100)]
tag option for clone command

Allow explicitly setting the tag option for the remote configuration
when cloning a repository.

Bug: 561021
Change-Id: Iac43268a2bb231ae7599c3255bf555883d34fa32
Signed-off-by: Alexander Nittka <alex@nittka.de>
4 years agoSet baseline for japicmp to 5.7.0.202003110725-r 75/159275/2
Thomas Wolf [Thu, 12 Mar 2020 18:59:31 +0000 (19:59 +0100)]
Set baseline for japicmp to 5.7.0.202003110725-r

Change-Id: Ifef50c9e58c6973676fd24888344e4e1621d0427
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoRevWalk: fix bad topo flags error message 67/159267/1
Alex Spradlin [Thu, 12 Mar 2020 16:04:36 +0000 (09:04 -0700)]
RevWalk: fix bad topo flags error message

The error message for an Exception thrown by StartGenerator when given
both the TOPO flag and the TOPO_KEEP_BRANCH_TOGETHER flag mentions a
non-existent flag, TOPO_NON_INTERMIX. The error message was introduced
in commit e498d43.

Replace TOPO_NON_INTERMIX with TOPO_KEEP_BRANCH_TOGETHER in the error
message of an Exception thrown by the StartGenerator when the TOPO flag
is provided together with the TOPO_KEEP_BRANCH_TOGETHER flag.

Signed-off-by: Alex Spradlin <alexaspradlin@google.com>
Change-Id: Id24640dc08e96a196508fe38ce144aa7e035082f

4 years agoMerge "RevWalk: new topo sort to not mix lines of history"
Jonathan Nieder [Thu, 12 Mar 2020 00:00:08 +0000 (20:00 -0400)]
Merge "RevWalk: new topo sort to not mix lines of history"

4 years agoRevWalk: new topo sort to not mix lines of history 49/158449/7
Alex Spradlin [Wed, 26 Feb 2020 23:31:37 +0000 (15:31 -0800)]
RevWalk: new topo sort to not mix lines of history

The topological sort algorithm in TopoSortGenerator for RevWalk may mix
multiple lines of history, producing results that differ from C git's
git-log whose man page states: "Show no parents before all of its
children are shown, and avoid showing commits on multiple lines of
history intermixed." Lines of history are mixed because
TopoSortGenerator merely delays producing a commit until all of its
children have been produced; it does not immediately produce a commit
after its last child has been produced.

Therefore, add a new RevSort option called TOPO_KEEP_BRANCH_TOGETHER
with a new topo sort algorithm in TopoNonIntermixGenerator. In the
Generator, when the last child of a commit has been produced, unpop
that commit so that it will be returned upon the subsequent call to
next(). To avoid producing duplicates, mark commits that have not yet
been produced as TOPO_QUEUED so that when a commit is popped, it is
produced if and only if TOPO_QUEUED is set.

To support nesting with other generators that may produce the same
commit multiple times like DepthGenerator (for example, StartGenerator
does this), do not increment parent inDegree for the same child commit
more than once.

Commit b5e764abd21bd4593287361a625ecc49bc0efd77 modified the existing
TopoSortGenerator to avoid mixing lines of history, but it was reverted
in e40c38ab08837473375c571c2f07ab680fc1985d because the new behavior
caused problems for EGit users. This motivated adding a new Generator
for the new behavior.

Signed-off-by: Alex Spradlin <alexaspradlin@google.com>
Change-Id: Icbb24eac98c00e45c175b01e1c8122554f617933

4 years agoUpgrade maven-site-plugin to 3.9.0 87/159187/1
David Pursehouse [Wed, 11 Mar 2020 14:00:18 +0000 (23:00 +0900)]
Upgrade maven-site-plugin to 3.9.0

Change-Id: I966a05b499d3853c39bc3da8c7e5a1abc11d398e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade build-helper-maven-plugin to 3.1.0 86/159186/1
David Pursehouse [Wed, 11 Mar 2020 13:59:48 +0000 (22:59 +0900)]
Upgrade build-helper-maven-plugin to 3.1.0

Change-Id: Iec821c7312ce185d29e64ee6f9852437e2bd99c4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoTransportHttp: support HTTP response 308 Permanent Redirect 94/159094/2
Thomas Wolf [Mon, 9 Mar 2020 22:41:37 +0000 (23:41 +0100)]
TransportHttp: support HTTP response 308 Permanent Redirect

RFC 7538[1] added HTTP response code 308, signifying a permanent
redirect that, contrary to the older 301, does not allow changing
the request method from POST to GET.

[1] https://tools.ietf.org/html/rfc7538

Bug: 560936
Change-Id: Ib65f3a3ed75db51d74d1fe81d4abe6fe92b0ca12
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoRemove unused API problem filters 93/159093/2
Thomas Wolf [Tue, 10 Mar 2020 06:38:15 +0000 (07:38 +0100)]
Remove unused API problem filters

Change-Id: I137cddaf0aecdf9f4bd1427fa9c1af1af4f5b546

4 years agoMerge branch 'stable-5.7' 78/159078/1
Matthias Sohn [Mon, 9 Mar 2020 23:42:10 +0000 (00:42 +0100)]
Merge branch 'stable-5.7'

* stable-5.7:
  Prepare 5.7.1-SNAPSHOT builds
  JGit v5.7.0.202003090808-r
  Prepare 5.7.0-SNAPSHOT builds
  JGit v5.7.0.202002241735-m3

Change-Id: Ibaf382bb2337ca8099f891d4364cebe0b85b095d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.7.1-SNAPSHOT builds 75/159075/1
Matthias Sohn [Mon, 9 Mar 2020 22:37:43 +0000 (23:37 +0100)]
Prepare 5.7.1-SNAPSHOT builds

Change-Id: I23748c20b69a1cfb47c5cd0d7858182d376b3ce1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.8.0-SNAPSHOT builds 73/159073/1
Matthias Sohn [Mon, 9 Mar 2020 21:47:10 +0000 (22:47 +0100)]
Prepare 5.8.0-SNAPSHOT builds

Change-Id: I056b45806a82eae80177932e42e3dc806015351a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.7.0.202003090808-r 34/159034/1 v5.7.0.202003090808-r
Matthias Sohn [Mon, 9 Mar 2020 13:09:24 +0000 (14:09 +0100)]
JGit v5.7.0.202003090808-r

Change-Id: Ia23bffa3952687f6107d496a8932d54b11c12412
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'master' into stable-5.7 88/158988/1
Matthias Sohn [Sat, 7 Mar 2020 20:09:48 +0000 (21:09 +0100)]
Merge branch 'master' into stable-5.7

* master:
  Silence API errors introduced by 093fbbd1
  Bump Bazel version to 2.2.0
  Add validation to hex decoder
  Expose FileStoreAttributes.setBackground()
  Update reftable storage repo layout
  Add 4.14 and 4.15-staging target platforms
  Update Orbit to R20200224183213 for final 2020-03
  Update Orbit to S20200224183213 for 2020-03 RC1
  Cygwin expects forward slashes for commands to be run via sh.exe
  [releng] Update year in copyright notices for features
  Using for-each loop in jdt
  Make Logger instances final
  Move array designators from the variable to the type
  ObjectWalk: Add null check before skip tree.
  Revert "RevWalk: stop mixing lines of history in topo sort"
  Do not fail if known hosts file does not contain valid host key

Change-Id: Ie7841d917b02c3579c4766e7214d6b1656c5f200

4 years agoMerge branch 'stable-5.6' 63/158863/2
Matthias Sohn [Thu, 5 Mar 2020 14:43:48 +0000 (15:43 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  Silence API errors introduced by 093fbbd1
  Bump Bazel version to 2.2.0
  Expose FileStoreAttributes.setBackground()
  Update reftable storage repo layout

Change-Id: I237eaaed7991e8bbd56a7624f47bbba985330026
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoSilence API errors introduced by 093fbbd1 51/158851/1
Matthias Sohn [Thu, 5 Mar 2020 12:53:10 +0000 (13:53 +0100)]
Silence API errors introduced by 093fbbd1

Change-Id: I1c9d5a25bd06a1152e953c45b683375cb05aa254
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoBump Bazel version to 2.2.0 34/158834/1
David Pursehouse [Thu, 5 Mar 2020 04:13:47 +0000 (13:13 +0900)]
Bump Bazel version to 2.2.0

Change-Id: I889052040f31708c6b8de0cf3c171a04722f7c96
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoAdd validation to hex decoder 73/158773/3
Michael Dardis [Wed, 4 Mar 2020 04:25:09 +0000 (15:25 +1100)]
Add validation to hex decoder

Does not fix any issue but prevents user from shooting themselves in the
foot with improper configuration.

Suggested by Demetr Starshov at https://git.eclipse.org/r/#/c/157681/

Change-Id: I006d65022f0a7d4066970825d00080c59404fdc3
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoExpose FileStoreAttributes.setBackground() 53/158353/3
Alex Blewitt [Tue, 25 Feb 2020 21:14:59 +0000 (21:14 +0000)]
Expose FileStoreAttributes.setBackground()

The FS.setAsyncFileStoreAttributes() static method calls
FileStoreAttributes.setBackground() as its implementation, but there are
other public attributes on this inner class already and there isn't a
real reason why this needs to be private.

By making it public we allow callers to be able to invoke it directly.
Although it doesn't appear that it would make a difference, by calling a
static method on the FS class, all static fields and the transitive
closure of class dependencies must be loaded and initialised, which can
be non-trivial.

Callers referring to FS.setAsyncFileStoreAttributes() may be replaced
with FS.FileStoreAttributes.setBackground() with no change of behaviour
other than improved performance due to less class loading required.

Bug: 560527
Change-Id: I9538acc90da8d18f53fd60d74eb54496857f93a5
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
4 years agoUpdate reftable storage repo layout 90/157990/9
Han-Wen Nienhuys [Tue, 18 Feb 2020 19:44:10 +0000 (20:44 +0100)]
Update reftable storage repo layout

The change Ic0b974fa (c217d33, "Documentation/technical/reftable:
improve repo layout") defines a new repository layout, which was
agreed with the git-core mailing list.

It addresses the following problems:

* old git clients will not recognize reftable-based repositories, and
  look at encompassing directories.

* Poorly written tools might write directly into
  .git/refs/heads/BRANCH.

Since we consider JGit reftable as experimental (git-core doesn't
support it yet), we have no backward compatibility. If you created a
repository with reftable between mid-Nov 2019 and now, you can do the
following to convert:

  mv .git/refs .git/reftable/tables.list
  git config core.repositoryformatversion 1
  git config extensions.refStorage reftable

Change-Id: I80df35b9d22a8ab893dcbe9fbd051d924788d6a5
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd 4.14 and 4.15-staging target platforms 07/158707/1
Matthias Sohn [Mon, 2 Mar 2020 21:29:03 +0000 (22:29 +0100)]
Add 4.14 and 4.15-staging target platforms

- copy old 4.14-staging to 4.14 target platform
- create 4.15-staging target platform from former 4.14-staging

Change-Id: I874f552205f1bc419334e4f66ebfef4cbc8cb4ff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate Orbit to R20200224183213 for final 2020-03 02/158702/1
Matthias Sohn [Mon, 2 Mar 2020 21:07:14 +0000 (22:07 +0100)]
Update Orbit to R20200224183213 for final 2020-03

Change-Id: I00eb77ec4c055de0e5900a2c4ed82770e2031dab
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge "ObjectWalk: Add null check before skip tree."
Jonathan Nieder [Mon, 2 Mar 2020 18:37:59 +0000 (13:37 -0500)]
Merge "ObjectWalk: Add null check before skip tree."

4 years agoUpdate Orbit to S20200224183213 for 2020-03 RC1 17/158617/1
Matthias Sohn [Fri, 28 Feb 2020 23:07:39 +0000 (00:07 +0100)]
Update Orbit to S20200224183213 for 2020-03 RC1

Change-Id: Ic37b1b8dc62de0bb30fa50562bed428f49d404bc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.6' 16/158616/1
Matthias Sohn [Fri, 28 Feb 2020 22:53:17 +0000 (23:53 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  Cygwin expects forward slashes for commands to be run via sh.exe
  Make Logger instances final
  Move array designators from the variable to the type

Change-Id: I9a5dc570deb478525bf48ef526d8cba5b19418bf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoCygwin expects forward slashes for commands to be run via sh.exe 38/158538/2
Thomas Wolf [Thu, 27 Feb 2020 19:04:47 +0000 (20:04 +0100)]
Cygwin expects forward slashes for commands to be run via sh.exe

FS_Win32_Cygwin replaces backslashes by / as a side-effect of
relativize(). When support for core.hooksPath was added, paths were
relativized in a different place using Path.resolve(), which doesn't
do that transformation. As a result hooks could not be run on Cygwin
in some cases.

Do the transformation in FS_Win32_Cygwin.runInShell(). In all other
places, File or Path objects are used, which give no guarantee about
the file separator (typically the system-dependent default separator),
so doing the transformation earlier still wouldn't guarantee that
sh.exe indeed gets a command string using forward slashes.

Bug: 558577
Change-Id: I3c07eb85f0ac7c5628a2e92f990e5cdb7ecf532f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoMerge "[releng] Update year in copyright notices for features"
David Pursehouse [Fri, 28 Feb 2020 13:40:40 +0000 (08:40 -0500)]
Merge "[releng] Update year in copyright notices for features"

4 years ago[releng] Update year in copyright notices for features 51/158551/2
Thomas Wolf [Thu, 27 Feb 2020 23:32:50 +0000 (00:32 +0100)]
[releng] Update year in copyright notices for features

Bump upper end of range to 2020.

These copyright notices are user-facing; they're visible in several
dialogs in Eclipse. It is strange or even misleading to see a copyright
notice for JGit saying "2005, 2010" when there have been *many*
developments in the past ten years.

Change-Id: Idaa6244b2b3d9cecb29cc690085f8d008195cf12
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoUsing for-each loop in jdt 82/158482/2
Lars Vogel [Thu, 27 Feb 2020 10:05:23 +0000 (11:05 +0100)]
Using for-each loop in jdt

Running the JDT cleanup action for using a for-each loop on jgit

Change-Id: Ie724d8bbdff786ab0167089e90a9914a8135103c
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
4 years agoMake Logger instances final 96/158496/1
David Pursehouse [Thu, 27 Feb 2020 11:32:29 +0000 (20:32 +0900)]
Make Logger instances final

Change-Id: Ibb997952917e47bc31a8cbe3863623bc959a8100
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMove array designators from the variable to the type 95/158495/1
David Pursehouse [Thu, 27 Feb 2020 11:27:31 +0000 (20:27 +0900)]
Move array designators from the variable to the type

As reported by Sonar Lint:

Array designators should always be located on the type for better code
readability. Otherwise, developers must look both at the type and the
variable name to know whether or not a variable is an array.

Change-Id: If6b41fed3483d0992d402d8680552ab4bef89ffb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge "Revert "RevWalk: stop mixing lines of history in topo sort""
Jonathan Nieder [Wed, 26 Feb 2020 22:48:18 +0000 (17:48 -0500)]
Merge "Revert "RevWalk: stop mixing lines of history in topo sort""

4 years agoObjectWalk: Add null check before skip tree. 71/158371/3
Yunjie Li [Wed, 26 Feb 2020 01:29:38 +0000 (17:29 -0800)]
ObjectWalk: Add null check before skip tree.

currVisit could be null if a blob is marked as start point in
ObjectWalk. Add null check before skipping current tree.

Change-Id: Ic5d876fe2800f3373d136979be6c27d1bbd38dc1
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoRevert "RevWalk: stop mixing lines of history in topo sort" 28/158428/3
Alex Spradlin [Wed, 26 Feb 2020 18:49:41 +0000 (13:49 -0500)]
Revert "RevWalk: stop mixing lines of history in topo sort"

This reverts commit b5e764abd21bd4593287361a625ecc49bc0efd77.

PlotWalk uses the TopoSortGenerator, which is causing problems for EGit users
who rely on the emission of commits being somewhat based on date as in the
previous topo-sort algorithm.

Bug: 560529
Change-Id: I3dbd3598a7aeb960de3fc39352699b4f11a8c226
Signed-off-by: Alex Spradlin <alexaspradlin@google.com>
4 years agoDo not fail if known hosts file does not contain valid host key 62/158362/7
Lajos Olah [Tue, 25 Feb 2020 22:17:02 +0000 (17:17 -0500)]
Do not fail if known hosts file does not contain valid host key

KnownHosts (implementing HostKeyRepository) in Jsch can return null
which could cause NullPointerException in Stream.of(...)

Change-Id: Iddcf5f34f8c8475a85ca7ae018bbe48d1b3fbbc0
Signed-off-by: Lajos Olah <lajos.olah.jr@gmail.com>
4 years agoPrepare 5.7.0-SNAPSHOT builds 88/158288/1
Matthias Sohn [Tue, 25 Feb 2020 10:25:02 +0000 (11:25 +0100)]
Prepare 5.7.0-SNAPSHOT builds

Change-Id: Ic4c83c0ed6cdef69890cc9c27b3aa35c3ff66240
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.7.0.202002241735-m3 66/158266/1 v5.7.0.202002241735-m3
Matthias Sohn [Mon, 24 Feb 2020 22:34:11 +0000 (23:34 +0100)]
JGit v5.7.0.202002241735-m3

Change-Id: I9f71835ed9a0a1176f7ac99edf45d9ce97080720
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'master' into stable-5.7 54/158254/1
Matthias Sohn [Mon, 24 Feb 2020 20:13:22 +0000 (21:13 +0100)]
Merge branch 'master' into stable-5.7

* master:
  Update Orbit to S20200219023850 for 2012-03 M3
  Revert "Prepend hostname to subsection used to store file timestamp resolution"
  Remove use of org.bouncycastle.util.encoders.Hex
  Remove use of org.bouncycastle.util.io.TeeOutputStream
  Make the IMatcher public API
  SimilarityRenameDetector: Fix inconsistent indentation
  Use indexOf(char) and lastIndexOf(char) rather than String versions
  Reorder modifiers to follow Java Language Specification
  GitmoduleEntry: Remove redundant import of class from same package
  Remove redundant "static" qualifier from enum declarations
  RevWalk: stop mixing lines of history in topo sort
  Upgrade plexus-compiler-{eclipse|javac|javac-errorprone} to 2.8.6
  Upgrade maven-shade-plugin to 3.2.2
  Removed unused imports
  Documentation/technical/reftable: improve repo layout

Change-Id: I558eff2abda44342fbaf1662fda07e2bcc6d4ee3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate Orbit to S20200219023850 for 2012-03 M3 90/158190/1
Matthias Sohn [Sun, 23 Feb 2020 22:51:53 +0000 (23:51 +0100)]
Update Orbit to S20200219023850 for 2012-03 M3

Change-Id: I7b216fa9a4d0724fa7723713b6dd57e269a5e8fe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.6' 39/158139/2
Matthias Sohn [Sat, 22 Feb 2020 22:29:14 +0000 (23:29 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  Revert "Prepend hostname to subsection used to store file timestamp resolution"
  SimilarityRenameDetector: Fix inconsistent indentation
  Use indexOf(char) and lastIndexOf(char) rather than String versions
  Reorder modifiers to follow Java Language Specification
  GitmoduleEntry: Remove redundant import of class from same package
  Remove redundant "static" qualifier from enum declarations

Change-Id: Ibb66bef7e8373f81e3e653c9843d986243446d68
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRevert "Prepend hostname to subsection used to store file timestamp resolution" 38/158138/1
Matthias Sohn [Sat, 22 Feb 2020 21:51:32 +0000 (22:51 +0100)]
Revert "Prepend hostname to subsection used to store file timestamp resolution"

This reverts commit e102bbed995f0e6d3a1a8e5db6d08f9804fd3260.

Resolving the hostname comes with a performance penalty. We no longer
store the timestamp resolution in the global git config which might be
copied around to other machines but in a dedicated jgit config meant for
automatically determined options like timestamp resolution. Hence there
is no strong reason anymore to have a hardware specific identifier in
the subsection name of file timestamp resolution options.

Bug: 560414
Change-Id: If8dcabe981eb1792db84643850faa6033f14b1cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove use of org.bouncycastle.util.encoders.Hex 81/157681/3
Michael Dardis [Fri, 14 Feb 2020 01:09:37 +0000 (12:09 +1100)]
Remove use of org.bouncycastle.util.encoders.Hex

Change-Id: I5c1ed0397ef99eb5d4f120da331b66c2d0f1707a
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove use of org.bouncycastle.util.io.TeeOutputStream 80/157680/4
Michael Dardis [Fri, 14 Feb 2020 01:07:19 +0000 (12:07 +1100)]
Remove use of org.bouncycastle.util.io.TeeOutputStream

Bug: 559106
Change-Id: Ife06f21a00d258780a2030745738194098c631cf
Signed-off-by: Michael Dardis <git@md-5.net>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMake the IMatcher public API 07/158007/2
Thomas Wolf [Wed, 19 Feb 2020 22:02:28 +0000 (23:02 +0100)]
Make the IMatcher public API

Provide a static factory method to create a PathMatcher.

Bug: 559526
Change-Id: Ib7a4a1bcc658ac2f2a09d365b5b891669dfd7570
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoSimilarityRenameDetector: Fix inconsistent indentation 73/157973/1
David Pursehouse [Wed, 19 Feb 2020 11:34:13 +0000 (20:34 +0900)]
SimilarityRenameDetector: Fix inconsistent indentation

Replace space indentation with tab indentation

Change-Id: Ic130d3bde5d3a73d8f5c6225974153573722d05b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUse indexOf(char) and lastIndexOf(char) rather than String versions 49/157949/1
David Pursehouse [Wed, 19 Feb 2020 04:23:14 +0000 (13:23 +0900)]
Use indexOf(char) and lastIndexOf(char) rather than String versions

An indexOf or lastIndexOf call with a single letter String can be
made more performant by switching to a call with a char argument.

Found with SonarLint.

As a side-effect of this change, we no longer need to suppress the
NON-NLS warnings.

Change-Id: Id44cb996bb74ed30edd560aa91fd8525aafdc8dd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoReorder modifiers to follow Java Language Specification 48/157948/1
David Pursehouse [Wed, 19 Feb 2020 04:15:43 +0000 (13:15 +0900)]
Reorder modifiers to follow Java Language Specification

The Java Language Specification recommends listing modifiers in
the following order:

1. Annotations
2. public
3. protected
4. private
5. abstract
6. static
7. final
8. transient
9. volatile
10. synchronized
11. native
12. strictfp

Not following this convention has no technical impact, but will reduce
the code's readability because most developers are used to the standard
order.

This was detected using SonarLint.

Change-Id: I9cddecb4f4234dae1021b677e915be23d349a380
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoGitmoduleEntry: Remove redundant import of class from same package 47/157947/1
David Pursehouse [Wed, 19 Feb 2020 04:06:18 +0000 (13:06 +0900)]
GitmoduleEntry: Remove redundant import of class from same package

Change-Id: I613489a937dd53780b0abfd6b1bd0ed964a5ddd8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoRemove redundant "static" qualifier from enum declarations 46/157946/1
David Pursehouse [Wed, 19 Feb 2020 04:04:08 +0000 (13:04 +0900)]
Remove redundant "static" qualifier from enum declarations

Nested enum types are implicitly static.

Change-Id: Id3d7886087494fb67bc0d080b4a3491fb4baac19
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.7' 42/157942/1
Matthias Sohn [Wed, 19 Feb 2020 00:44:47 +0000 (01:44 +0100)]
Merge branch 'stable-5.7'

* stable-5.7:
  Update API problem filter
  Prepare 5.6.2-SNAPSHOT builds
  JGit v5.6.1.202002131546-r
  Simplify ReftableCompactor

Change-Id: I1aa650e030fbaa7a1c898eef1836de529e0c30db
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.6' into stable-5.7 41/157941/1
Matthias Sohn [Wed, 19 Feb 2020 00:44:18 +0000 (01:44 +0100)]
Merge branch 'stable-5.6' into stable-5.7

# By Matthias Sohn (3) and Han-Wen Nienhuys (1)
* stable-5.6:
  Update API problem filter
  Prepare 5.6.2-SNAPSHOT builds
  JGit v5.6.1.202002131546-r
  Simplify ReftableCompactor

Change-Id: I16ed174f9fc662934c3ebaea85a60690efbed1c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge "RevWalk: stop mixing lines of history in topo sort"
Jonathan Tan [Tue, 18 Feb 2020 23:41:03 +0000 (18:41 -0500)]
Merge "RevWalk: stop mixing lines of history in topo sort"

4 years agoRevWalk: stop mixing lines of history in topo sort 26/157526/14
Alex Spradlin [Tue, 11 Feb 2020 21:27:51 +0000 (13:27 -0800)]
RevWalk: stop mixing lines of history in topo sort

The topological sort algorithm in TopoSortGenerator for RevWalk may mix
multiple lines of history, producing results that differ from C git's
git log whose man page states: "Show no parents before all of its
children are shown, and avoid showing commits on multiple lines of
history intermixed." Lines of history are mixed because
TopoSortGenerator merely delays a commit until all of its children have
been produced; it does not immediately produce a commit after its last
child has been produced.

Therefore, when the last child of a commit has been produced, unpop the
commit so that it will be returned upon the subsequent call to next() in
TopoSortGenerator. To avoid producing duplicates, mark commits that
have not yet been produced as TOPO_QUEUED so that when a commit is
popped, it is produced if and only if TOPO_QUEUED is set.

To support nesting with other generators that may produce the same
commit multiple times like DepthGenerator (for example, StartGenerator
does this), do not increment parent inDegree for the same child commit
more than once.

Modify tests that assert that TopoSortGenerator mixes lines of commit
history.

Change-Id: I4ee03c7a8e5265d61230b2a01ae3858745b2432b
Signed-off-by: Alex Spradlin <alexaspradlin@google.com>
4 years agoMerge "Documentation/technical/reftable: improve repo layout"
Jonathan Nieder [Tue, 18 Feb 2020 18:08:26 +0000 (13:08 -0500)]
Merge "Documentation/technical/reftable: improve repo layout"

4 years agoUpgrade plexus-compiler-{eclipse|javac|javac-errorprone} to 2.8.6 12/157812/1
David Pursehouse [Mon, 17 Feb 2020 11:25:57 +0000 (20:25 +0900)]
Upgrade plexus-compiler-{eclipse|javac|javac-errorprone} to 2.8.6

Change-Id: Ie49e487a2bc10b62db623f2e128fa063bfbc77bf
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade maven-shade-plugin to 3.2.2 30/157630/2
David Pursehouse [Thu, 13 Feb 2020 11:07:12 +0000 (20:07 +0900)]
Upgrade maven-shade-plugin to 3.2.2

Change-Id: I63bdd436f04690028ecb493efc92c603a8049eb8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoRemoved unused imports 97/157797/1
Andrey Loskutov [Mon, 17 Feb 2020 08:05:53 +0000 (09:05 +0100)]
Removed unused imports

This fixes compilation errors in 4.15 M3

Bug: 560210
Change-Id: I7f36edc7fb83c66c8889d7573b4439d5a52334e4
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
4 years agoMerge branch 'master' into stable-5.7 59/157759/2
Thomas Wolf [Sat, 15 Feb 2020 16:35:42 +0000 (17:35 +0100)]
Merge branch 'master' into stable-5.7

* master:
  Use lambdas where possible
  Upgrade maven-pmd-plugin to 3.13.0
  Include org.apache.commons.codec 1.13 in the JGit http.apache.feature
  Update Maven plugins
  AmazonS3: Speed up fetch, try recent packs first
  Update orbit to S20200128200239 for 2020-03 M2
  FS: re-order fields and use all uppercase for true constants
  FS: Don't use innocuous threads for CompletableFuture
  ErrorProne: Enable and fix UnusedException check
  Update Orbit to I20200126235943 and org.junit to 4.13.0.v20200126-2018
  Fix SshSessionFactory#setInstance to use service loader
  Use ServiceLoader to define the default SSH session factory.
  Remove Error-Prone ExpectedExceptionChecker
  ReceivePack: enable overriding filterCommands and executeCommands
  Replace ExpectedException which was deprecated in junit 4.13
  Add org.assertj 3.14.0.v20200120-1926 to target platform
  Replace deprecated junit assertion methods with hamcrest
  Update to Orbit I20200120214610 and JUnit to 4.13
  Update to Tycho 1.6.0
  Extract method refactoring in class DirCacheCheckout
  Update Orbit to I20200115225246 and update dependencies
  Update bazlets and bazel version

Change-Id: Ib6cd6593484cd79def9d5298181411189575c9f7
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoUpdate API problem filter 96/157696/1
Matthias Sohn [Fri, 14 Feb 2020 08:17:07 +0000 (09:17 +0100)]
Update API problem filter

Change-Id: Iced4e3cc68cc9c2a75f9bf5befd6db7ce2fb1374
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.6.2-SNAPSHOT builds 78/157678/1
Matthias Sohn [Thu, 13 Feb 2020 23:15:39 +0000 (00:15 +0100)]
Prepare 5.6.2-SNAPSHOT builds

Change-Id: Ie04d749bf16eea6db5e5c98be54ba093ca249d05
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.6.1.202002131546-r 70/157670/1 v5.6.1.202002131546-r
Matthias Sohn [Thu, 13 Feb 2020 20:45:37 +0000 (21:45 +0100)]
JGit v5.6.1.202002131546-r

Change-Id: I2807b9a9f7e8b877b72702ebd1f70c4f9f223481
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.7' 29/157629/1
David Pursehouse [Thu, 13 Feb 2020 11:06:42 +0000 (20:06 +0900)]
Merge branch 'stable-5.7'

* stable-5.7:
  Bump required Bazel version to 2.1.0
  Upgrade bazlets to the latest master revision
  Change the wildcard import to explicit ones.

Change-Id: I5aeaad53ac729e2dcfa67c6830accee749cd21cd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.6' into stable-5.7 12/157612/1
David Pursehouse [Thu, 13 Feb 2020 00:02:43 +0000 (09:02 +0900)]
Merge branch 'stable-5.6' into stable-5.7

* stable-5.6:
  Bump required Bazel version to 2.1.0
  Upgrade bazlets to the latest master revision
  Change the wildcard import to explicit ones.
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r
  reftable: don't check deadline on the first try
  reftable: clarify comment
  reftable: clear cache on full compaction
  reftable: remove outdated comment
  reftable: clarify that LogCursor may return a null ReflogEntry
  Restore behavior of CloneCommand

Change-Id: Ifc30b40ef58d5cda4b1cf3694488424beb182cfc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoSimplify ReftableCompactor 81/156281/6
Han-Wen Nienhuys [Tue, 21 Jan 2020 18:06:30 +0000 (19:06 +0100)]
Simplify ReftableCompactor

The ReftableCompactor supported a byteLimit, but this is currently
unused. The FileReftableStack has a more sophisticated strategy that
amortizes compaction costs.

Rename min/maxUpdateIndex to reflogExpire{Min,Max}UpdateIndex to
reflect their purpose  more accurately.

Since reflogs are generally pruned chronologically (oldest entries are
expired first), one can only prune entries on full compaction, so they
should not be set by default.

Rephrase the function Reader#minUpdateIndex and maxUpdateIndex. These
vars are documented to affect log entries, but semantically, they are
about ref entries. Since ref entries have their timestamps
delta-compressed, it is important for the min/maxUpdateIndex values to
be coherent between different tables.

The logical timestamps for log entries do not have to be coherent in
different tables, as the timestamps of a log entry is part of the key.
For example, a table written at update index 20 may contain a tombstone
log entry at timestamp 1.

Therefore, we set ReftableWriter's min/maxUpdateIndex from the merged
tables we are compacting, rather than from the compaction settings
(which should only control reflog expiry.)

The previous behavior could drop log entries erroneously, especially
in the presence of tombstone log entries. Unfortunately, testing this
properly requires both an API for adding log tombstones, and a more
refined API for controlling automatic compaction. Hence, no test.

Change-Id: I2f4eb7866f607fddd0629809e8e61f0b9097717f
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
4 years agoBump required Bazel version to 2.1.0 52/157552/1
David Pursehouse [Wed, 12 Feb 2020 09:40:45 +0000 (18:40 +0900)]
Bump required Bazel version to 2.1.0

Change-Id: I2e4f44a8d591ba26c14189fc46ead0feaef187c3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoUpgrade bazlets to the latest master revision 51/157551/1
David Pursehouse [Wed, 12 Feb 2020 09:42:12 +0000 (18:42 +0900)]
Upgrade bazlets to the latest master revision

Includes "Use now mandatory https protocol for MAVEN_CENTRAL".

Change-Id: I4e83bf9a01f1d2a3bea4ce855709fd33e624fe9a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoChange the wildcard import to explicit ones. 50/157550/1
Yunjie Li [Mon, 9 Dec 2019 22:34:16 +0000 (14:34 -0800)]
Change the wildcard import to explicit ones.

Change-Id: Ia7bc1c4b6b82c127e1e4e0e657f69d249684e8e6
Signed-off-by: Yunjie Li <yunjieli@google.com>
4 years agoMerge branch 'stable-5.6' 34/157534/1
Matthias Sohn [Tue, 11 Feb 2020 23:05:45 +0000 (00:05 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I39c936b951870b0cc845e4ab54afdfb45ee65b20
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.5' into stable-5.6 31/157531/1
Matthias Sohn [Tue, 11 Feb 2020 22:53:24 +0000 (23:53 +0100)]
Merge branch 'stable-5.5' into stable-5.6

* stable-5.5:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I67e7b9994aff40b05792bee2306476cf749723e0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 30/157530/1
Matthias Sohn [Tue, 11 Feb 2020 22:52:16 +0000 (23:52 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I44b39161f775a52795f6bff312a27227e893651e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.3' into stable-5.4 29/157529/1
Matthias Sohn [Tue, 11 Feb 2020 22:51:38 +0000 (23:51 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I075f8b8f97a5e97602c058770fe12164af2ce66a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.3.8-SNAPSHOT builds 82/157482/1
Matthias Sohn [Tue, 11 Feb 2020 10:54:11 +0000 (11:54 +0100)]
Prepare 5.3.8-SNAPSHOT builds

Change-Id: I64ef3b4cf30e87d058001c2c6f1458f4b0c1df00
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoDocumentation/technical/reftable: improve repo layout 67/157167/5
Han-Wen Nienhuys [Tue, 4 Feb 2020 18:34:02 +0000 (19:34 +0100)]
Documentation/technical/reftable: improve repo layout

Previously, the list of tables was in .git/refs. This makes
repo detection fail in older clients, which is undesirable.

This is proposal was discussed and approved on the git@vger list at

  https://lore.kernel.org/git/CAFQ2z_PvKiz==GyS6J1H1uG0FRPL86JvDj+LjX1We4-yCSVQ+g@mail.gmail.com/

For backward compatibility, JGit could detect a file under .git/refs and
use it as a reftable list.

Change-Id: Ic0b974fa250cfa905463b811957e2a4fdd7bbc6b
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
4 years agoJGit v5.3.7.202002110540-r 81/157481/1 v5.3.7.202002110540-r
Matthias Sohn [Tue, 11 Feb 2020 10:37:34 +0000 (11:37 +0100)]
JGit v5.3.7.202002110540-r

Change-Id: I3ba41af516b9d3b74ac580b3e170ad0e6e0663d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.2' into stable-5.3 79/157479/1
Matthias Sohn [Tue, 11 Feb 2020 10:26:03 +0000 (11:26 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I78cbed22c0f0f5872fa44b9a564f6d31dcace582

4 years agoMerge branch 'stable-5.1' into stable-5.2 78/157478/1
Matthias Sohn [Tue, 11 Feb 2020 10:18:12 +0000 (11:18 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I57fc818e719bc94f90ab1aeb34016eea74d84719
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.1.14-SNAPSHOT builds 77/157477/1
Matthias Sohn [Tue, 11 Feb 2020 10:12:20 +0000 (11:12 +0100)]
Prepare 5.1.14-SNAPSHOT builds

Change-Id: Ic7d6f1a6c3123af1a1fa782f052b0cea3b6f28c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.1.13.202002110435-r 75/157475/1 v5.1.13.202002110435-r
Matthias Sohn [Tue, 11 Feb 2020 09:30:36 +0000 (10:30 +0100)]
JGit v5.1.13.202002110435-r

Change-Id: Iedc8699ad1a24efe7ddb47ae919c75b9d36141d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.6' 57/157457/1
Matthias Sohn [Tue, 11 Feb 2020 00:39:27 +0000 (01:39 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  reftable: don't check deadline on the first try
  reftable: clarify comment
  reftable: clear cache on full compaction
  reftable: remove outdated comment
  reftable: clarify that LogCursor may return a null ReflogEntry

Change-Id: I9458a746311984fa687b3da964805e2568ed37f3

4 years agoreftable: don't check deadline on the first try 31/156831/5
Han-Wen Nienhuys [Wed, 29 Jan 2020 18:12:06 +0000 (19:12 +0100)]
reftable: don't check deadline on the first try

This helps debug stepping.

Change-Id: I020dafab4ffac75e6df0dbcde0ed4805c7867f72
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
4 years agoreftable: clarify comment 30/156830/5
Han-Wen Nienhuys [Wed, 29 Jan 2020 18:11:22 +0000 (19:11 +0100)]
reftable: clarify comment

Change-Id: I16e32aeb325b604eb31f84db18a214f792395941
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoreftable: clear cache on full compaction 29/156829/5
Han-Wen Nienhuys [Wed, 29 Jan 2020 18:11:00 +0000 (19:11 +0100)]
reftable: clear cache on full compaction

The merged table contains handles to open files. A full compaction
causes those files to be closed, and so further lookups would fail
with EBADF.

Change-Id: I7bb74f7228ecc7fec9535b00e56a617a9c18e00e
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoreftable: remove outdated comment 28/156828/3
Han-Wen Nienhuys [Wed, 29 Jan 2020 17:56:12 +0000 (18:56 +0100)]
reftable: remove outdated comment

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I41a7d9934d53553b5f81f40ff9d663378676ac5d

4 years agoreftable: clarify that LogCursor may return a null ReflogEntry 27/156827/3
Han-Wen Nienhuys [Wed, 29 Jan 2020 17:55:43 +0000 (18:55 +0100)]
reftable: clarify that LogCursor may return a null ReflogEntry

Change-Id: I1a4d5c262cd196dca37876aec00bb974a45e9fcd
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
4 years agoMerge branch 'stable-5.6' 23/157423/1
Matthias Sohn [Fri, 7 Feb 2020 10:05:44 +0000 (11:05 +0100)]
Merge branch 'stable-5.6'

* stable-5.6:
  Restore behavior of CloneCommand

Change-Id: I3092bf214c41436b57e0ede9d2202f8aabf15471
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUse lambdas where possible 33/154833/5
Lars Vogel [Thu, 19 Dec 2019 20:09:45 +0000 (21:09 +0100)]
Use lambdas where possible

Using the batch cleanup operation via Source -> Cleanup -> "Use lambdas
where possible" from standard JDT.

Change-Id: I5452bd94fdccc920ade071228aeed3a8b9fdbe62
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
4 years agoMerge "Include org.apache.commons.codec 1.13 in the JGit http.apache.feature"
David Pursehouse [Wed, 5 Feb 2020 00:34:42 +0000 (19:34 -0500)]
Merge "Include org.apache.commons.codec 1.13 in the JGit http.apache.feature"

4 years agoUpgrade maven-pmd-plugin to 3.13.0 31/157131/1
David Pursehouse [Tue, 4 Feb 2020 09:54:23 +0000 (18:54 +0900)]
Upgrade maven-pmd-plugin to 3.13.0

Change-Id: I6e20b77db743cd8578aa1f8688f893b746e861d1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoRestore behavior of CloneCommand 84/157084/2
Thomas Wolf [Mon, 3 Feb 2020 20:00:46 +0000 (21:00 +0100)]
Restore behavior of CloneCommand

Commit 6216b0de changed the behavior of the setMirror(),
setCloneAllBranches(), and setBranchesToClone() operations. Before
that commit, these could be set and reset independently and only in
call() it would be determined what exactly to do. Since that commit,
the last of these calls would determine the operation. This means
that the sequence

  cloneCommand.setCloneAllBranches(true);
  cloneCommand.setBranchesToClone(/* some list of refs */);

would formerly do a "clone all" giving a fetch refspec with wildcards

  +refs/heads/*:refs/remotes/origin/*

which picks up new upstream branches, whereas since commit 6216b0de
individual non-wildcard fetch refspecs would be generated and new
upstream branches would not be fetched anymore.

Undo this behavioral change. Make the operations independently settable
and resettable again, and determine the exact operation only in call():
mirror=true > cloneAll=true > specific refs, where ">" means "takes
precedence over", and if none is set assume cloneAll=true.

Note that mirror=true implies setBare(true).

Bug: 559796
Change-Id: I7162b60e99de5e3e512bf27ff4113f554c94f5a6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoInclude org.apache.commons.codec 1.13 in the JGit http.apache.feature 30/157030/1
Thomas Wolf [Sun, 2 Feb 2020 21:28:22 +0000 (22:28 +0100)]
Include org.apache.commons.codec 1.13 in the JGit http.apache.feature

We do include httpcomponents.httpclient, but that depends on
commons.codec. By including it here we can ensure that the version
needed is indeed available.

Bug: 559735
Change-Id: I16ef830cfe4f8e3b8a8ca08476fd655f41eee51b
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>