]> source.dussan.org Git - jgit.git/log
jgit.git
5 years agoUpgrade maven-compiler-plugin to 3.8.1 10/141610/4
David Pursehouse [Sun, 5 May 2019 05:42:23 +0000 (14:42 +0900)]
Upgrade maven-compiler-plugin to 3.8.1

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

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

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

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

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

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

Replace:

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

with:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The callback interface is invoked after object upload was
completed.

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

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

Change-Id: I685d8a797209bc1b9c1bb9caba40ac8713c6ce5b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 65/140865/1
Matthias Sohn [Fri, 19 Apr 2019 10:35:26 +0000 (12:35 +0200)]
Merge branch 'stable-4.11' into stable-5.0

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

Change-Id: I9b7f9faf3dc584068456f1ae2cacc4ce5137d4ad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.11.9-SNAPSHOT builds 63/140863/1
Matthias Sohn [Fri, 19 Apr 2019 10:05:01 +0000 (12:05 +0200)]
Prepare 4.11.9-SNAPSHOT builds

Change-Id: Ie0ef10159bac6daf4db3f68e8c0825bc1608e40f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.11.8.201904181247-r 41/140841/1 v4.11.8.201904181247-r
Matthias Sohn [Thu, 18 Apr 2019 16:47:14 +0000 (18:47 +0200)]
JGit v4.11.8.201904181247-r

Change-Id: I0356bde8fbb789faa74ed3635046f4fd0dce28de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 40/140840/1
Matthias Sohn [Thu, 18 Apr 2019 16:44:23 +0000 (18:44 +0200)]
Merge branch 'stable-4.10' into stable-4.11

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

Change-Id: Ib2a170e24bddad0e8c9c7be6688269f6318bf30f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 39/140839/1
Matthias Sohn [Thu, 18 Apr 2019 16:42:45 +0000 (18:42 +0200)]
Merge branch 'stable-4.9' into stable-4.10

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

Change-Id: I94c9e6300b5f77b185ec6661fa76f0c74a5fc2a9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.9.11-SNAPSHOT builds 38/140838/1
Matthias Sohn [Thu, 18 Apr 2019 16:05:43 +0000 (18:05 +0200)]
Prepare 4.9.11-SNAPSHOT builds

Change-Id: I99137bc4958167773d2fc8b1d48fbb508af52be5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.9.10.201904181027-r 36/140836/1 v4.9.10.201904181027-r
Matthias Sohn [Thu, 18 Apr 2019 14:26:30 +0000 (16:26 +0200)]
JGit v4.9.10.201904181027-r

Change-Id: I3034d1ad263fdfb23347304f866309354930fd19
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.8' into stable-4.9 17/140817/1
Matthias Sohn [Thu, 18 Apr 2019 12:43:23 +0000 (14:43 +0200)]
Merge branch 'stable-4.8' into stable-4.9

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

Change-Id: Idaa789e699f1ef568ea957184d0641355d9e3181

5 years agoMerge branch 'stable-4.7' into stable-4.8 21/140721/1 stable-4.8
Matthias Sohn [Tue, 16 Apr 2019 22:49:03 +0000 (00:49 +0200)]
Merge branch 'stable-4.7' into stable-4.8

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

Change-Id: I7984f68833f2d615399296e53cb9a64e5b4ca6ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.7.10-SNAPSHOT builds 20/140720/1 stable-4.7
Matthias Sohn [Tue, 16 Apr 2019 22:18:13 +0000 (00:18 +0200)]
Prepare 4.7.10-SNAPSHOT builds

Change-Id: I662ee441521c1370a31f274cc6d001723ad0c528
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.7.9.201904161809-r 18/140718/1 v4.7.9.201904161809-r
Matthias Sohn [Tue, 16 Apr 2019 22:08:39 +0000 (00:08 +0200)]
JGit v4.7.9.201904161809-r

Change-Id: Id6e379c3ce52c83455e37cbc3d77db0e188fdb85
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.6' into stable-4.7 17/140717/1
Matthias Sohn [Tue, 16 Apr 2019 21:53:21 +0000 (23:53 +0200)]
Merge branch 'stable-4.6' into stable-4.7

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

Change-Id: I6ea51dde6608a4163d681aa1ebf710f06da44b21
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.5' into stable-4.6 16/140716/1 stable-4.6
Matthias Sohn [Mon, 15 Apr 2019 23:04:52 +0000 (01:04 +0200)]
Merge branch 'stable-4.5' into stable-4.6

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

Change-Id: I0b4eaa521ebdea83ab18c05915d691c07a575a7d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agotree:<depth>: do not revisit tree during packing 59/139659/10
Matthew DeVore [Wed, 27 Mar 2019 21:35:51 +0000 (14:35 -0700)]
tree:<depth>: do not revisit tree during packing

If a tree is visited during pack and filtered out with tree:<depth>, we
may need to include it if it is visited again at a lower depth.

Until now we revisit it no matter what the depth is. Now, avoid
visiting it if it has been visited at a lower or equal depth.

Change-Id: I68cc1d08f1999a8336684a05fe16e7ae51898866
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agotree:<depth> should not traverse overly-deep trees 50/139550/11
Matthew DeVore [Mon, 25 Mar 2019 22:36:35 +0000 (15:36 -0700)]
tree:<depth> should not traverse overly-deep trees

If we are traversing a tree which is too deep, then there is no need to
traverse the children. Skipping children is much faster than traversing
the possibly thousands of objects which are directly or indirectly
referenced by the tree.

Change-Id: I6d68cc1d35da48e3288b9cc80356a281ab36863d
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoPreliminary support for tree:<depth> filter 92/138992/26
Matthew DeVore [Mon, 18 Mar 2019 14:15:52 +0000 (07:15 -0700)]
Preliminary support for tree:<depth> filter

This is used when fetching, and in particular to populate a partial
clone or a virtual file system cache as the user navigates. With this,
a client can pre-fetch a few directories deeper than only the current
directory.

depth:0 will omit all trees, and is useful if you only want to fetch
the commits of a repository, or fetch just a single tree or blob object.
depth:1 will fetch only the root tree of all commits fetched. depth:2
will fetch the root tree and all blobs and tree objects directly
referenced from it. depth:3 gets one more level, and so on. depth:#
will not filter a blob or tree that is explicitly marked wanted.

Bitmaps are disabled when this filter is used.

This implementation is quite slow because it iterates over all omitted
objects rather than skipping them. This will be addressed in follow-up
commits.

Change-Id: Ic312fee22d60e32cfcad59da56980e90ae2cae6a
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoPrepare 4.5.8-SNAPSHOT builds 42/140642/1 stable-4.5
Matthias Sohn [Mon, 15 Apr 2019 22:34:19 +0000 (00:34 +0200)]
Prepare 4.5.8-SNAPSHOT builds

Change-Id: I70628cb8fcad0a60598dc937abbed63606a78599
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.5.7.201904151645-r 29/140629/1 v4.5.7.201904151645-r
Matthias Sohn [Mon, 15 Apr 2019 20:46:38 +0000 (22:46 +0200)]
JGit v4.5.7.201904151645-r

Change-Id: I3e32cf13f5cb99d8e570412d80d941740399c07d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge "Revert "Use try-with-resources in SubmoduleWalk""
Jonathan Nieder [Sun, 14 Apr 2019 16:09:02 +0000 (12:09 -0400)]
Merge "Revert "Use try-with-resources in SubmoduleWalk""

5 years agoRevert "Use try-with-resources in SubmoduleWalk" 61/140561/1
Jonathan Nieder [Sun, 14 Apr 2019 15:00:46 +0000 (11:00 -0400)]
Revert "Use try-with-resources in SubmoduleWalk"

This reverts commit 39b0b51b1253f569888db3578b01708a14360b69. Before
that change, SubmoduleWalk.forPath transferred ownership to the caller
on success. Afterward, it returns a closed SubmoduleWalk to the caller,
which does not appear to be intentional.

Change-Id: I9381daac5153706e24fd9117700089848b58c54e

5 years agoUse Arrays.asList instead of copying array in a for loop 63/140163/9
Carsten Hammer [Sat, 6 Apr 2019 18:42:38 +0000 (20:42 +0200)]
Use Arrays.asList instead of copying array in a for loop

Change-Id: Ie44950f7d2f2f94a0412efb6c274f6e1e31efcd6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUse try-with-resources in SubmoduleWalk 61/140161/13
Carsten Hammer [Thu, 11 Apr 2019 17:53:55 +0000 (19:53 +0200)]
Use try-with-resources in SubmoduleWalk

Convert try finally block to try-with-resources
Change-Id: Ifd676a2aba3e926bd2f3b6b8fefd5f63564899ed
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUse isEmpty() instead of size()==0 where possible 58/140158/13
Carsten Hammer [Thu, 11 Apr 2019 17:27:34 +0000 (19:27 +0200)]
Use isEmpty() instead of size()==0 where possible

Change-Id: I97f1367a2ea9f1f6146e264c27c3981b842f2a26
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUse jdk 5 for loop 55/140155/14
Carsten Hammer [Sat, 6 Apr 2019 17:16:36 +0000 (19:16 +0200)]
Use jdk 5 for loop

Replace simple uses of Iterator with a corresponding for-loop.
Also add missing braces on loops as necessary.

Change-Id: I708d82acdf194787e3353699c07244c5ac3de189
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJoin catch sections using multicatch 53/140153/18
Carsten Hammer [Sat, 6 Apr 2019 16:16:21 +0000 (18:16 +0200)]
Join catch sections using multicatch

Change-Id: I1a9112e6a4f938638c599b489cb0858eca27ab91
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoProcess unshallow commits first 63/140463/1
Masaya Suzuki [Fri, 12 Apr 2019 02:39:22 +0000 (19:39 -0700)]
Process unshallow commits first

DepthGenerator marks commits reinteresting for the ones that are
reachable from unshallow commits as it walks over the revisions. Those
unshallow commits won't necessarily be processed first. Because of this,
even if a commit is reachable from unshallow commits, if it's processed
before the uninteresting commits, it will not be processed as
reinteresting and processed as uninteresting. This causes unshallow
git-fetch to be failed.

This changes DepthGenerator to process unshallow commits first
independent to their depth. This makes uninteresting flag carry work
properly.

Change-Id: I94378271cf85fbe6302cefc19a167d8cf68e1a69
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
5 years agoRemember the cause for invalidating a packfile 88/140288/7
Luca Milanesio [Tue, 9 Apr 2019 09:44:06 +0000 (10:44 +0100)]
Remember the cause for invalidating a packfile

Keep track of the original cause for a packfile invalidation.
It is needed for the sysadmin to understand if there is a real
underlying filesystem problem and repository corruption or if it is
simply a consequence of a concurrency of Git operations (e.g. repack
or GC).

Change-Id: I06ddda9ec847844ec31616ab6d17f153a5a34e33
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoRemove unnecessary type specifications 60/140160/5
Carsten Hammer [Sat, 6 Apr 2019 17:44:26 +0000 (19:44 +0200)]
Remove unnecessary type specifications

Since Java 7 the diamond operator can be used instead of explicit
type parameters.

Change-Id: I2dee5fce7afebb1d9088eeaec4484ee58b4fa492
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUse String.isEmpty() instead of comparing to "" 59/140159/5
Carsten Hammer [Sat, 6 Apr 2019 17:38:27 +0000 (19:38 +0200)]
Use String.isEmpty() instead of comparing to ""

Use of String.equals("") can be replaced with with String.length() == 0
(for JDK5 and lower) or String.isEmpty() (for JDK6 and higher)

Change-Id: Id1462d22c5d249485d87993263a9239809e73c55
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUse StringBuilder instead of StringBuffer where possible. 57/140157/5
Carsten Hammer [Sat, 6 Apr 2019 17:27:36 +0000 (19:27 +0200)]
Use StringBuilder instead of StringBuffer where possible.

Change-Id: Ifc67c84a3e786cd766f45726733a6d294d2652a1
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoReplace usage of String.indexOf with String.contains where possible 54/140154/4
Carsten Hammer [Sat, 6 Apr 2019 17:06:58 +0000 (19:06 +0200)]
Replace usage of String.indexOf with String.contains where possible

Change-Id: Iad3fce891077d85cf2533272c54206c33c37afd8
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoConfigTest: Add test for parsing invalid group header 80/140180/2
David Pursehouse [Mon, 8 Apr 2019 03:52:36 +0000 (12:52 +0900)]
ConfigTest: Add test for parsing invalid group header

Test that an exception is raised for an invalid group header:

  [group "foo" ]
     foo = bar

i.e. where there is a space between the group subsection name
and the closing ']'.

Change-Id: I8933ae100b77634b0afb66bb8aa43d24c955799e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoFix API problem filters 96/140396/1
Matthias Sohn [Wed, 10 Apr 2019 12:05:57 +0000 (14:05 +0200)]
Fix API problem filters

Change-Id: I96e0ddc34251348ec4877c9d94b045eb1c53e758
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoFix pack files scan when filesnapshot isn't modified 07/140207/4
Luca Milanesio [Mon, 8 Apr 2019 12:26:12 +0000 (13:26 +0100)]
Fix pack files scan when filesnapshot isn't modified

Do not reload packfiles when their associated filesnapshot is not
modified on disk compared to the one currently stored in memory.

Fix the regression introduced by fef78212 which, in conjunction with
core.trustfolderstats = false, caused any lookup of objects inside
the packlist to loop forever when the object was not found in the pack
list.

Bug: 546190
Change-Id: I38d752ebe47cefc3299740aeba319a2641f19391
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoIntroduce RefDatabase#getTipsWithSha1 to list refs pointing to object 47/135547/7
Patrick Hiesel [Tue, 22 Jan 2019 09:02:14 +0000 (10:02 +0100)]
Introduce RefDatabase#getTipsWithSha1 to list refs pointing to object

Add resolveTipSha1, an inverse of exactRef(String ...), to RefDatabase
and provide a default implementation that runs in O(n) time where n is
the number of refs. For RefTable, provide an implementation that runs
in O(log(n)) time.

[ifrade@google.com: with tests in InMemoryRepositoryTest to exercise
 the reftable code path, too]

Change-Id: I2811ccd0339cdc1c74b42cce2ea003f07a2ce9e1
Signed-off-by: Patrick Hiesel <hiesel@google.com>
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoLocalDiskRepositoryTestCase: Clarify semantics of repository creation methods 27/140027/3
David Pursehouse [Thu, 4 Apr 2019 10:59:52 +0000 (19:59 +0900)]
LocalDiskRepositoryTestCase: Clarify semantics of repository creation methods

Several of the utility methods create a Repository without setting
the 'autoClose' flag, which means that the caller is responsible for
closing it. Update the Javadoc to explicitly mention this.

Change-Id: I2410dd8d230cd4519f756c38b17141d0daa6c314
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoUploadPackTest: Stop using deprecated Transport.setFilterBlobLimit(long) 24/140024/3
David Pursehouse [Thu, 4 Apr 2019 10:48:01 +0000 (19:48 +0900)]
UploadPackTest: Stop using deprecated Transport.setFilterBlobLimit(long)

Replace usage with the recommended setFilterSpec(FilterSpec).

Change-Id: Icc528d175f25234eeb2daa6b4c29a67a7a6d1e0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoAttach deletion failure reason in FileUtils.delete() 64/139964/2
Thomas Wolf [Wed, 3 Apr 2019 15:32:53 +0000 (17:32 +0200)]
Attach deletion failure reason in FileUtils.delete()

Use Files.delete() instead of File.delete(), and if there is
an exception thrown propagate it unless errors are to be ignored so
that the actual deletion failure cause is available to the caller
(and will be logged).

Change-Id: I5fdb5a4052942437ab365289ad4bb1b563c29456
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoIgnore invalid files in '.gnupg/private-keys-v1.d' 30/139930/2
Gunnar Wagenknecht [Tue, 2 Apr 2019 20:47:07 +0000 (13:47 -0700)]
Ignore invalid files in '.gnupg/private-keys-v1.d'

Bug: 545673
Change-Id: I4a2ee1e76f320209b3f8090264d771f1a9da566f
Signed-off-by: Gunnar Wagenknecht <gunnar@wagenknecht.org>
5 years agoAdd missing source bundles and add them to a single source feature 22/139822/3
Matthias Sohn [Sun, 31 Mar 2019 23:30:44 +0000 (01:30 +0200)]
Add missing source bundles and add them to a single source feature

Add missing source bundles for
- org.eclipse.jgit.ant
- org.eclipse.jgit.archive
- org.eclipse.jgit.http.apache
- org.eclipse.jgit.http.server
- org.eclipse.jgit.junit
- org.eclipse.jgit.junit.http
- org.eclipse.jgit.junit.ssh
- org.eclipse.jgit.lfs
- org.eclipse.jgit.lfs.server
- org.eclipse.jgit.ui

Combine all source bundles into a single source feature
org.eclipse.jgit.source and delete the other source features.

Ensure all bundles are added to the jgit p2 repository.

Change-Id: I56785f49c940b79f41f763c26e63a4a820ed7cce
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge ".gitignore: remove editor- and OS-specific files"
Jonathan Nieder [Mon, 1 Apr 2019 20:47:06 +0000 (16:47 -0400)]
Merge ".gitignore: remove editor- and OS-specific files"

5 years ago.gitignore: remove editor- and OS-specific files 26/139526/4
Matthew DeVore [Tue, 26 Mar 2019 17:27:38 +0000 (10:27 -0700)]
.gitignore: remove editor- and OS-specific files

Whenever Vim opens a file, it creates a .<filename>.swp file in the same
directory as the file. Emacs adds *~ backup files. macOS creates
.DS_Store files. Other editors and OS' surely do their own thing. Rather
than add each one's own swap/backup file to this .gitignore, encourage
users to add the corresponding items to their system-wide gitignore
files.

Change-Id: I5535f5d2f1ebe896eef108cfda087dcb4c50f031
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years ago[releng] Fix dependencies between features 01/139801/4
Thomas Wolf [Thu, 28 Mar 2019 21:28:47 +0000 (22:28 +0100)]
[releng] Fix dependencies between features

Add dependencies from source to binary features and enforce the same
version. Restrict the dependencies between binary features by version,
too.

Adapt the version.sh script to properly replace these version numbers.

Bug: 545906
Change-Id: I953616e58d27accdf61b49f6435a54895bcbf6da
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoConvert target platform to simple POM project 46/139446/4
Michael Keppler [Mon, 25 Mar 2019 17:06:58 +0000 (18:06 +0100)]
Convert target platform to simple POM project

There is no reason why this is a plugin project. It is sufficient as
Xtext nature project which is only built via Maven.

Change-Id: I000f61f27aeb5c377fbbb7f452c26b0d0bff0ae0
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
5 years agoSuppress API error for new constant Ref.UNDEFINED_UPDATE_INDEX 96/139796/1
Matthias Sohn [Sat, 30 Mar 2019 07:17:49 +0000 (08:17 +0100)]
Suppress API error for new constant Ref.UNDEFINED_UPDATE_INDEX

Change-Id: If8f7c9cc4b78ce2de29b0d93f2b98c2d0dd1eb3d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDfsRefDatabase: Keep update index when peeling a reference 57/139657/4
Ivan Frade [Wed, 27 Mar 2019 23:24:13 +0000 (16:24 -0700)]
DfsRefDatabase: Keep update index when peeling a reference

The new references created in the peeling do not receive the update
index. In other words, the update index of a reference (if set) is lost
in the peeling.

Pass-through the update index to the newly created references.

Tested via InMemoryRepository, which uses DfsReftableDatabase.

Change-Id: I7ff7c737a9c3366fdec296a4d9b2e51d10227957
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoRef: Add constant for undefined update index 56/139656/3
Ivan Frade [Wed, 27 Mar 2019 22:21:50 +0000 (15:21 -0700)]
Ref: Add constant for undefined update index

Code that creates references and wants to support ref dbs with and
without update indexes needs to set this value. This leds to a
proliferation of "-1" in the code base.

Make the "undefined" value a constant in the ref interface.

Change-Id: I2622a37536a84b4a4036dd55792e185486fa0628
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoClarify error message for invalid Windows characters 73/139473/2
Han-Wen Nienhuys [Tue, 26 Mar 2019 10:22:56 +0000 (11:22 +0100)]
Clarify error message for invalid Windows characters

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

5 years agoFix API error filter settings 10/139610/1
Matthias Sohn [Wed, 27 Mar 2019 15:26:28 +0000 (16:26 +0100)]
Fix API error filter settings

- UploadPack.getFilterBlobLimit() didn't have a wrong @since tag but was
marked final shortly after 5.3 was released. This was probably caused by
using an outdated API baseline. Currently we should use 5.3.0 as the
baseline.
- remove unused filter on FS.fileAttributes()

Change-Id: I9adc1703e99a9ddb3ea2a1c12a83dccbc1f69a99
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJustify API-breaking changes introduced in 4cd9548 51/139451/2
Matthew DeVore [Mon, 25 Mar 2019 18:53:28 +0000 (11:53 -0700)]
Justify API-breaking changes introduced in 4cd9548

Use .api_filters to suppress API baseline errors. The justification is
included in comments in that file.

Change-Id: I7b5c69d8d13733719b28ef7317fc9780ed2828d8
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoMerge "diff: Add "--staged" as alias to "--cached""
Christian Halstrick [Mon, 25 Mar 2019 14:26:21 +0000 (10:26 -0400)]
Merge "diff: Add "--staged" as alias to "--cached""

5 years agodiff: Add "--staged" as alias to "--cached" 56/138156/2
Andre Bossert [Mon, 4 Mar 2019 16:30:16 +0000 (17:30 +0100)]
diff: Add "--staged" as alias to "--cached"

see: https://git-scm.com/docs/git-diff

"--staged is a synonym of --cached"

Change-Id: Ie73f6b3d3b7179c339151cebab98f9ddee6aaf49
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
5 years agoObjectWalk: simplify tree traversal logic 91/138991/19
Matthew DeVore [Mon, 18 Mar 2019 21:05:46 +0000 (14:05 -0700)]
ObjectWalk: simplify tree traversal logic

Inline newTreeVisit into enterTree and call the new method pushTree. Use
pushTree both for pushing children of the existing currVisit.

Change-Id: I75ea37f48b2befb738a3e88bed40ac08f1df9a03
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoExpose and pass around the FilterSpec object rather than the raw blob limit 90/138990/18
Matthew DeVore [Mon, 18 Mar 2019 16:45:59 +0000 (09:45 -0700)]
Expose and pass around the FilterSpec object rather than the raw blob limit

Use the FilterSpec object so that less code has to know about the make-up of
FilterSpecs. When fields are added to FilterSpec, these pieces of code won't
need updating again.

Change-Id: I2b9e59a9926ff112faf62a3fa2d33c961a1779e5
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoPut filter spec information in a dedicated object 89/138989/11
Matthew DeVore [Sat, 16 Mar 2019 01:57:04 +0000 (18:57 -0700)]
Put filter spec information in a dedicated object

This increases type-safety and is ground work for support of the
"tree:<depth>" filter.

Change-Id: Id19eacdcdaddb9132064c642f6d554b1060efe9f
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoUse Objects.requireNonNull instead of a custom helper 46/139346/1
Jonathan Nieder [Fri, 22 Mar 2019 16:44:27 +0000 (09:44 -0700)]
Use Objects.requireNonNull instead of a custom helper

This simplifies the API surface and makes JGit internals into less of
a custom Java dialect.

Change-Id: Idbb7d4d1037c5336341088385b8e0a59c8b4c952

5 years agoIntroduce a checkNotNull helper 39/139339/1
Jonathan Nieder [Fri, 22 Mar 2019 16:07:03 +0000 (09:07 -0700)]
Introduce a checkNotNull helper

When using @NonNull annotations in new code, if I write

public void setFrobber(@NonNull frobber) {
this.frobber = frobber;
}

then consumers of the JGit library that do not have nullness checking
enabled can easily pass in null by mistake.  On the other hand, if I
write

public void setFrobber(@NonNull frobber) {
if (frobber == null) {
throw new NullPointerException();
}
this.frobber = frobber;
}

then Eclipse JDT complains:

Null comparison always yields false: The variable frobber is specified as @NonNull

Add a checkNotNull helper that offers the best of both worlds:

public void setFrobber(@NonNull frobber) {
this.frobber = checkNotNull(frobber);
}

Briefer code, null check is intact, and no warning.

Inspired by Guava's com.google.common.base.Preconditions.checkNotNull.

Change-Id: If59588d13a1119e899657ed2296931ea18ed0e2a

5 years agoUpgrade ecj to 3.17.0 58/139258/2
David Pursehouse [Thu, 21 Mar 2019 18:16:15 +0000 (18:16 +0000)]
Upgrade ecj to 3.17.0

Change-Id: Ia0806034668af65196c3223f5ee32065e07bbb2d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.3' 48/139248/1
Matthias Sohn [Thu, 21 Mar 2019 15:47:08 +0000 (16:47 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I080ddb03c6143f0bfa24707a10a4d926676d32b1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 47/139247/1
Matthias Sohn [Thu, 21 Mar 2019 15:45:26 +0000 (16:45 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I29e1da15396daaf0036bcb92cfb567cc243db5a1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 45/139245/1
Matthias Sohn [Thu, 21 Mar 2019 15:14:03 +0000 (16:14 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I0cf4d26bdee5ecee43e723c4176efbce777acabc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 44/139244/1
Matthias Sohn [Thu, 21 Mar 2019 15:07:11 +0000 (16:07 +0100)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I5c0e7d59f137c27e4588f20f4472d3ea450cd59c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 42/139242/1
Matthias Sohn [Thu, 21 Mar 2019 14:55:39 +0000 (15:55 +0100)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Fix GC to delete empty fanout directories after repacking

Change-Id: Idce894a24e126e0fbe7bc9b6a3c64318f1a8eb75
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 40/139240/1
Matthias Sohn [Thu, 21 Mar 2019 14:35:18 +0000 (15:35 +0100)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Fix GC to delete empty fanout directories after repacking

Change-Id: I7118b9c668dcbb0f5435cc613e964c557bfebf01
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 38/139238/1
Matthias Sohn [Thu, 21 Mar 2019 14:06:47 +0000 (15:06 +0100)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix GC to delete empty fanout directories after repacking

Change-Id: Ibdbfe08eb290286fa738010bad1c604e857885cd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMove filter-line-parsing code to a separate file 92/139192/2
Matthew DeVore [Thu, 21 Mar 2019 01:47:24 +0000 (18:47 -0700)]
Move filter-line-parsing code to a separate file

This code is not specific to V2 of the protocol, so it doesn't belong
there. Move it to its own class.

Change-Id: I8084764147d1d0e2bceaaead59b332a8ec1a0825
Signed-off-by: Matthew DeVore <matvore@gmail.com>
5 years agoUse RefMap instead of HashMap 76/139076/7
Masaya Suzuki [Wed, 20 Mar 2019 03:42:10 +0000 (20:42 -0700)]
Use RefMap instead of HashMap

HashMap<String, Ref> has a memory overhead for refs. Use RefMap.

Change-Id: I3fb4616135dacf687cc3bc2b473effc66ccef5e6
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
5 years agoFix GC to delete empty fanout directories after repacking 18/139118/1
Matthias Sohn [Wed, 20 Mar 2019 12:54:10 +0000 (13:54 +0100)]
Fix GC to delete empty fanout directories after repacking

The prune method did not delete empty fanout directories when loose
objects moved to a new pack file but only when loose unreferenced
objects were pruned.

Change-Id: Ia068f4914c54d9cf9f40b75e8ea50759402b5000
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoDescribeCommandTest: Trivially fix formatting by removing a blank line 21/138921/1
Sebastian Schuberth [Mon, 18 Mar 2019 08:30:02 +0000 (09:30 +0100)]
DescribeCommandTest: Trivially fix formatting by removing a blank line

Change-Id: Ibf0343f05b2c08f87e4f3cb0d56a11e797bcde53
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoDescribeCommand: Add a missing dots at the end of docs 20/138920/1
Sebastian Schuberth [Fri, 15 Mar 2019 14:26:05 +0000 (15:26 +0100)]
DescribeCommand: Add a missing dots at the end of docs

Ensure the sentences to document fields consistenly end with a dot.

Change-Id: I084899cafe4dea6f2424132dce9f3adca2e20985
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
5 years agoReplace "Checkout" by "Check out" when used as a verb 59/138859/1
Thomas Wolf [Fri, 15 Mar 2019 20:07:42 +0000 (21:07 +0100)]
Replace "Checkout" by "Check out" when used as a verb

One occurrence in core JGit, several in jgit.pgm. One unused
occurrence in jgit.pgm; remove it.

Change-Id: I04c3dd9d9f542f1e1ac6df4cbf03bcefb6bfdf78
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
5 years agoBaseReceive/UploadPack: Stop using deprecated RefAdvertiser.send(Map) 09/138709/3
Ivan Frade [Thu, 14 Mar 2019 04:39:51 +0000 (21:39 -0700)]
BaseReceive/UploadPack: Stop using deprecated RefAdvertiser.send(Map)

RefAdvertiser.send(Map<String, Ref>) is deprecated in favour of
RefAdvertiser.send(Collection<Ref>). Subclasses that need to override
the "send" method need to override also the deprecated version, because
it is still invoked by BaseReceivePack and UploadPack.

Remove the last usages of the deprecated method.

Change-Id: I7eba426970251f78801ddf96b87a65d1baaebdcf
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge branch 'stable-5.3' 80/138680/1
Matthias Sohn [Wed, 13 Mar 2019 16:47:08 +0000 (17:47 +0100)]
Merge branch 'stable-5.3'

* stable-5.3:
  Prepare 5.3.1-SNAPSHOT builds
  JGit v5.3.0.201903130848-r
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ief9f6a9e89c4a1ef122daedbfd933676393fab06
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.3.1-SNAPSHOT builds 67/138667/1
Matthias Sohn [Wed, 13 Mar 2019 14:10:17 +0000 (15:10 +0100)]
Prepare 5.3.1-SNAPSHOT builds

Change-Id: I8dc5e47bd19809d684579610edf922abca3cb3cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.0.201903130848-r 52/138652/1 v5.3.0.201903130848-r
Matthias Sohn [Wed, 13 Mar 2019 12:47:54 +0000 (13:47 +0100)]
JGit v5.3.0.201903130848-r

Change-Id: I52256a6d07011030698299d9a97dd01ea825fb7f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 37/138637/1
Matthias Sohn [Wed, 13 Mar 2019 09:14:07 +0000 (10:14 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

Change-Id: Ia866587a910e620cb297bcb2a81fe0786f4e3db2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 21/138621/1
Matthias Sohn [Wed, 13 Mar 2019 06:51:34 +0000 (07:51 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.7-SNAPSHOT builds
  JGit v5.1.6.201903130242-r
  Prepare 4.11.8-SNAPSHOT builds
  JGit v4.11.7.201903122105-r
  Prepare 4.9.10-SNAPSHOT builds
  JGit v4.9.9.201903122025-r
  Prepare 4.7.9-SNAPSHOT builds
  JGit v4.7.8.201903121755-r
  Prepare 4.5.7-SNAPSHOT builds
  JGit v4.5.6.201903121547-r
  Check for packfile validity and fd before reading
  Move throw of PackInvalidException outside the catch
  Use FileSnapshot to get lastModified on PackFile
  Include size when comparing FileSnapshot
  Do not reuse packfiles when changed on filesystem
  Silence API warnings for new API introduced for fixes

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