]> source.dussan.org Git - jgit.git/log
jgit.git
5 years agoRemove unused text "symlinkCannotBeWrittenAsTheLinkTarget" 58/131558/2
Matthias Sohn [Sun, 28 Oct 2018 13:35:54 +0000 (14:35 +0100)]
Remove unused text "symlinkCannotBeWrittenAsTheLinkTarget"

The only reference to this externalized text was deleted in c88d34b0.

Change-Id: Iecc7cc89192d69431dddb6550a02f66f0b09accc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoFix typos 47/131547/2
Michael Keppler [Sat, 27 Oct 2018 19:55:39 +0000 (21:55 +0200)]
Fix typos

s/occured/occurred/
s/stablished/established/

Change-Id: Ib052bef60bd18043001a30ed43754ee1a5182016
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate eclipse compiler org.eclipse.jdt:ecj to 3.15.0 52/131552/1
Matthias Sohn [Sat, 27 Oct 2018 23:50:46 +0000 (01:50 +0200)]
Update eclipse compiler org.eclipse.jdt:ecj to 3.15.0

Change-Id: Iabca86db71e166e6ce73db2f8ddc5058e58da11a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agogitignore/gitattributes: fix matching of \r 40/117640/5
Marc Strapetz [Mon, 19 Feb 2018 10:26:09 +0000 (11:26 +0100)]
gitignore/gitattributes: fix matching of \r

Patterns should treat \r in file names as normal characters

Change-Id: Ica3e0fa4a58acf5326db46bb28571fe5f20f6cd2
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
5 years agoUpgrade maven-pmd-plugin to 3.11.0 98/131498/1
David Pursehouse [Fri, 26 Oct 2018 09:47:26 +0000 (18:47 +0900)]
Upgrade maven-pmd-plugin to 3.11.0

Change-Id: I145272faa1f4cdead4706d71299ce6a0b27902cf
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge "InternalPushConnection: don't swallow RuntimeException"
Dave Borowitz [Thu, 25 Oct 2018 14:35:43 +0000 (10:35 -0400)]
Merge "InternalPushConnection: don't swallow RuntimeException"

5 years agoUploadPack: Implement deepen-not for protocol v2 61/130361/7
Jonathan Tan [Mon, 1 Oct 2018 22:50:47 +0000 (15:50 -0700)]
UploadPack: Implement deepen-not for protocol v2

This allows clients to use the --shallow-exclude parameter (producing a
"deepen-not <ref>" line when communicating with the server) in their fetch
commands when fetching against a JGit server using protocol v2.

Note that the implementation in this commit is somewhat inefficient, as
described in the TODO comment in DepthGenerator.

Change-Id: I9fad3ed9276b624d8f668356ffd99a067dc67ef7
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
5 years agoThrow error when deepen-since excludes all commits 59/130359/4
Jonathan Tan [Tue, 2 Oct 2018 22:18:43 +0000 (15:18 -0700)]
Throw error when deepen-since excludes all commits

In C Git, when a client fetches with "git fetch --shallow-since=<date>
origin <ref>", and all commits reachable from <ref> are older than
<date>, the server dies with a message "no commits selected for shallow
requests". That is, (1) the --shallow-since filter applies to the commit
pointed to by the ref itself, and (2) there is a check that at least one
commit is not filtered out. (The pack-protocol.txt documentation does
not describe this, but the C implementation does this.)

The implementation in commit 1bb430dc21 ("UploadPack: support
deepen-since in protocol v2", 2018-09-27) does neither (1) nor (2), so
do both of these.

Change-Id: I9946327a71627626ecce34ca2d017d2add8867fc
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
5 years agoMerge changes from topic 'moving-to-request-2'
Jonathan Nieder [Mon, 22 Oct 2018 17:49:38 +0000 (13:49 -0400)]
Merge changes from topic 'moving-to-request-2'

* changes:
  UploadPack v0: Extract "agent" client capability at parse time
  UploadPack: Return correct peer user agent on v2 requests

5 years agoUploadPack v0: Extract "agent" client capability at parse time 49/131149/12
Ivan Frade [Thu, 18 Oct 2018 17:54:14 +0000 (10:54 -0700)]
UploadPack v0: Extract "agent" client capability at parse time

The request receives a list of capabilities and takes out the "agent" to
offer it on its own setter (getAgent).

Do this at parse time: when reading the line if the capability is
"agent" set it directly in the builder.

This makes the treatment of "agent" consistent in v0/v1 and v2.

Change-Id: Ie4f9f2cad8639adeeaef4921df49a30a8ce5b42f
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMake PrePushHook properly terminate ref lines 90/130990/5
Markus Keller [Tue, 16 Oct 2018 14:25:56 +0000 (16:25 +0200)]
Make PrePushHook properly terminate ref lines

All of the input lines passed to pre-push hook scripts must be properly
terminated by '\n', so that normal shell scripts like the git-supplied
pre-push.sample work properly, even when pushing just a single branch.

With the old code, hook scripts that use the following pattern didn't
process the last line, because 'read' has a non-zero exit status when
EOF is encountered:
  while read local_ref local_sha remote_ref remote_sha; do ... done

Change-Id: Id899662ed3fedef6c314fc4b2ddf91a6dcb98cbb
Signed-off-by: Markus Keller <markus.kell.r@gmail.com>
5 years agoRemoteRefUpdate#toString: Fix indentation 84/131284/1
David Pursehouse [Sun, 21 Oct 2018 11:05:56 +0000 (20:05 +0900)]
RemoteRefUpdate#toString: Fix indentation

Change-Id: Ide2a7e914ab0ff50cf34ff5bc6df3219efe4ba96
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years ago[releng] Fix boxing warning 54/131254/1
Michael Keppler [Sat, 20 Oct 2018 13:19:23 +0000 (15:19 +0200)]
[releng] Fix boxing warning

Use Integer.valueOf() to avoid the warning by implicit conversion due to
usage as argument object in String.format().

Change-Id: Ib314f629d54ae1ce9729c3837d66ce8982a1898a
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
5 years agoCheckoutCommand: force flag now allows overwrite 23/127823/9
Ned Twigg [Tue, 21 Aug 2018 21:44:28 +0000 (14:44 -0700)]
CheckoutCommand: force flag now allows overwrite

Before this commit, a force checkout would fail if there
were any conflicting files. After this commit, a force
checkout will overwrite the conflicting files, as expected.

Making this work required fixing a bug in DirCacheCheckout.
Before this commit, when DirCacheCheckout had
failOnConflict=false, it would delete all conflicting files
from the working copy and just leave them missing. After
this commit, DirCacheCheckout overwrites conflicting files
with the merge tree.

This change in DirCacheCheckout causes "reset --hard" and
"revert --abort" to behave as expected (previously they
would simply delete conflicting files, now they will be
overwritten from the merge tree).

Change-Id: If7e328ee792ef6511ab7d9c26d8d77c39210ec9f
Signed-off-by: Ned Twigg <ned.twigg@diffplug.com>
5 years agoMerge branch 'stable-5.1' 40/131240/4
David Pursehouse [Sat, 20 Oct 2018 09:04:41 +0000 (18:04 +0900)]
Merge branch 'stable-5.1'

* stable-5.1:
  Prepare 5.1.4-SNAPSHOT builds
  JGit v5.1.3.201810200350-r
  Prepare 4.11.6-SNAPSHOT builds
  JGit v4.11.5.201810191925-r
  Prepare 4.9.8-SNAPSHOT builds
  JGit v4.9.7.201810191756-r
  Update API problem filter
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: Ic8b2189fdd8403294327a17cc0c1f6a6e2f78cb8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoPrepare 5.1.4-SNAPSHOT builds 44/131244/1
Matthias Sohn [Sat, 20 Oct 2018 08:39:16 +0000 (10:39 +0200)]
Prepare 5.1.4-SNAPSHOT builds

Change-Id: Iee86860f3b4eb9f4af818c60342fd29465c0474c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.1.3.201810200350-r 43/131243/1 v5.1.3.201810200350-r
Matthias Sohn [Sat, 20 Oct 2018 07:50:16 +0000 (09:50 +0200)]
JGit v5.1.3.201810200350-r

Change-Id: Ib2c5a79d4fdf77680b7b65652fc3659527df27ad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.0' into stable-5.1 35/131235/2
David Pursehouse [Sat, 20 Oct 2018 05:46:20 +0000 (14:46 +0900)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:

All commits from stable-5.0 are already in stable-5.1 due to an
accidental merge of stable-4.11 into stable-5.1 by I3ec3c9af4.

Change-Id: I8a89d103be2b2cb7657e82a124e7db41239a2447
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge "Merge branch 'stable-4.11' into stable-5.0" into stable-5.1
David Pursehouse [Sat, 20 Oct 2018 05:39:43 +0000 (01:39 -0400)]
Merge "Merge branch 'stable-4.11' into stable-5.0" into stable-5.1

5 years agoMerge branch 'stable-4.11' into stable-5.0 38/131238/1
David Pursehouse [Sat, 20 Oct 2018 05:29:12 +0000 (14:29 +0900)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Prepare 4.11.6-SNAPSHOT builds
  JGit v4.11.5.201810191925-r
  Prepare 4.9.8-SNAPSHOT builds
  JGit v4.9.7.201810191756-r
  Update API problem filter
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: Ib6493d2b6270fe4f237ea52d97848239c16c1d9d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.11' into stable-5.0 34/131234/1
Matthias Sohn [Sat, 20 Oct 2018 00:12:24 +0000 (02:12 +0200)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  Prepare 4.11.6-SNAPSHOT builds
  JGit v4.11.5.201810191925-r
  Prepare 4.9.8-SNAPSHOT builds
  JGit v4.9.7.201810191756-r
  Update API problem filter
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I3ec3c9af49b11979a551a9749d5a8ba5ef2ef726
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.11.6-SNAPSHOT builds 31/131231/1
Matthias Sohn [Sat, 20 Oct 2018 00:08:35 +0000 (02:08 +0200)]
Prepare 4.11.6-SNAPSHOT builds

Change-Id: Ic823775aad59530f516602e7e848474d65763314
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUploadPack: Return correct peer user agent on v2 requests 48/131148/10
Ivan Frade [Wed, 17 Oct 2018 23:52:30 +0000 (16:52 -0700)]
UploadPack: Return correct peer user agent on v2 requests

UploadPack.getPeerUserAgent() doesn't produce the expected results for
protocol v2 requests. In v2, the agent reported in the request (in an
"agent=" line) is not in the clientCapabilities but in a field on its
own. This makes getPeerUserAgent default to the transport user agent.

Making "agent" a shared property between protocol v0/v1 and v2 fixes the
problem, simplifies the function and harmonizes the implementation
between protocol versions.

In a follow up commit the "agent" will be identified on parsing time,
instead of taking it from the client capabilities.

Change-Id: Idf9825ec4e0b81a1458c8e3701f3e28aafd8a32a
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoJGit v4.11.5.201810191925-r 30/131230/1 v4.11.5.201810191925-r
Matthias Sohn [Fri, 19 Oct 2018 23:27:52 +0000 (01:27 +0200)]
JGit v4.11.5.201810191925-r

Change-Id: I9d11536062de74775ca545c26f341610d0ddaeb2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.10' into stable-4.11 29/131229/1
Matthias Sohn [Fri, 19 Oct 2018 23:23:17 +0000 (01:23 +0200)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  Prepare 4.9.8-SNAPSHOT builds
  JGit v4.9.7.201810191756-r
  Update API problem filter
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I5698fde41417c4ce9e813c683c84978f303b76fe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.9' into stable-4.10 27/131227/1
Matthias Sohn [Fri, 19 Oct 2018 22:16:21 +0000 (00:16 +0200)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Prepare 4.9.8-SNAPSHOT builds
  JGit v4.9.7.201810191756-r
  Update API problem filter
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I6f07ea02491ba3a32f30ee2408e1153241cc8a07
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 4.9.8-SNAPSHOT builds 26/131226/1
Matthias Sohn [Fri, 19 Oct 2018 22:10:02 +0000 (00:10 +0200)]
Prepare 4.9.8-SNAPSHOT builds

Change-Id: Iab7b0f2a21a76f801a83fbeb54f09d1525878f4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.9.7.201810191756-r 25/131225/1 v4.9.7.201810191756-r
Matthias Sohn [Fri, 19 Oct 2018 21:58:47 +0000 (23:58 +0200)]
JGit v4.9.7.201810191756-r

Change-Id: Ib980731eb9ec7f4c92deac9b4cf2f7a994d670c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate API problem filter 24/131224/1
Matthias Sohn [Fri, 19 Oct 2018 21:54:38 +0000 (23:54 +0200)]
Update API problem filter

Change-Id: Iba8650900d3936edccbe30de9d3eafd4f9e0dba6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-4.8' into stable-4.9 23/131223/1
Matthias Sohn [Fri, 19 Oct 2018 21:30:02 +0000 (23:30 +0200)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: Ic18af2ddcba8f7a53eb27a33ea9f637adb941993
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoAccept protocol v2 server options on fetch and ls-refs requests 22/127722/18
Ivan Frade [Thu, 26 Jul 2018 22:49:09 +0000 (15:49 -0700)]
Accept protocol v2 server options on fetch and ls-refs requests

In protocol v2, a command request can be followed by server options
(lines like "agent=<>" and "server-option=<>"), but current code
doesn't accept those lines.

Advertise the "server-option" capability, parse the lines and add
them to the request objects.

Other code in JGit can see this options and act accordingly via the
protocol v2 hooks.

This should not require any change in the client side.

Change-Id: If3946390f9cc02d29644b6ca52534b6f757bda9f
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge branch 'stable-4.7' into stable-4.8 22/131222/1
Matthias Sohn [Fri, 19 Oct 2018 20:36:31 +0000 (22:36 +0200)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Prepare 4.7.7-SNAPSHOT builds
  JGit v4.7.6.201810191618-r
  Update API problem filter
  Fix file handle leak in ObjectDownloadListener.onWritePossible
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I783a083c0092a400f28f7977fbc4e556af88c8de

5 years agoPrepare 4.7.7-SNAPSHOT builds 20/131220/1
Matthias Sohn [Fri, 19 Oct 2018 20:27:47 +0000 (22:27 +0200)]
Prepare 4.7.7-SNAPSHOT builds

Change-Id: I131e40cbbf32bc75d2ed24ca31ba3613a3bbca25
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v4.7.6.201810191618-r 19/131219/1 v4.7.6.201810191618-r
Matthias Sohn [Fri, 19 Oct 2018 20:18:38 +0000 (22:18 +0200)]
JGit v4.7.6.201810191618-r

Change-Id: Iaee27d5e2de016240f1a0940653fef82c6044a1d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUpdate API problem filter 18/131218/1
Matthias Sohn [Fri, 19 Oct 2018 20:15:39 +0000 (22:15 +0200)]
Update API problem filter

Change-Id: I66c0c490bb66adafac5d670d2d9571f1674a281e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoUploadPack: Use request instead of field for client capabilities 55/129755/8
Ivan Frade [Tue, 16 Oct 2018 23:37:18 +0000 (16:37 -0700)]
UploadPack: Use request instead of field for client capabilities

Change-Id: Idc21e2b3fd145d2a4b15c1cea5ec1956541e3b40
Signed-off-by: Ivan Frade <ifrade@google.com>
5 years agoMerge branch 'stable-4.6' into stable-4.7 84/131184/1
David Pursehouse [Fri, 19 Oct 2018 09:43:43 +0000 (18:43 +0900)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I3e1a870a225447e761368298ce9b65dbec2c2a82
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-4.5' into stable-4.6 83/131183/1
David Pursehouse [Fri, 19 Oct 2018 09:43:03 +0000 (18:43 +0900)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: I9c925a65d42559443ade9ac8291ffe00f4a1dda1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.4' into stable-4.5 68/131168/2
David Pursehouse [Fri, 19 Oct 2018 01:45:49 +0000 (10:45 +0900)]
Merge branch 'stable-4.4' into stable-4.5

* stable-4.4:
  Prepare 4.4.2-SNAPSHOT builds
  JGit v4.0.3.201509231615-r

Change-Id: Icd66a796b0cce93c75a52cc77fec8f9df3eeccb4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.3' into stable-4.4 67/131167/1 stable-4.4
David Pursehouse [Fri, 19 Oct 2018 01:43:03 +0000 (10:43 +0900)]
Merge branch 'stable-4.3' into stable-4.4

* stable-4.3:
  JGit v4.0.3.201509231615-r

Change-Id: I147d81a9cc9c0f9e66084897df9c88c369539db7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.2' into stable-4.3 66/131166/1 stable-4.3
David Pursehouse [Fri, 19 Oct 2018 01:42:21 +0000 (10:42 +0900)]
Merge branch 'stable-4.2' into stable-4.3

* stable-4.2:
  JGit v4.0.3.201509231615-r

Change-Id: Ic90ef74497afee9da4b49dcb53302b4efa5b9f26
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.1' into stable-4.2 65/131165/1 stable-4.2
David Pursehouse [Fri, 19 Oct 2018 01:41:26 +0000 (10:41 +0900)]
Merge branch 'stable-4.1' into stable-4.2

* stable-4.1:
  JGit v4.0.3.201509231615-r

Change-Id: I6cc5bcefad2e8dee3394770d36608f981bfc9a9e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.0' into stable-4.1 64/131164/1 stable-4.1
David Pursehouse [Fri, 19 Oct 2018 01:38:48 +0000 (10:38 +0900)]
Merge branch 'stable-4.0' into stable-4.1

* stable-4.0:
  JGit v4.0.3.201509231615-r

Change-Id: Ie74b0392ef145ffd27dc903c45f7fec2d4492a17
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-5.1' 63/131163/1
David Pursehouse [Thu, 18 Oct 2018 23:06:39 +0000 (08:06 +0900)]
Merge branch 'stable-5.1'

* stable-5.1:
  ssh: Prefer algorithms of the known host keys

Change-Id: I4868359c9df75cb2c51331789cb9f34473801569
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUploadPack.FirstLine: Revert renaming of getOptions into getCapabilities 62/131162/3
Ivan Frade [Thu, 18 Oct 2018 22:16:37 +0000 (15:16 -0700)]
UploadPack.FirstLine: Revert renaming of getOptions into getCapabilities

This is public facing, stable API.

Fortunately, this class is deprecated and will be removed in the next
major version bump.

Change-Id: I91193964732e9d1943e9dc613256196e9c9d1274
Signed-off-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agossh: Prefer algorithms of the known host keys 02/130402/5
Saša Živkov [Thu, 4 Oct 2018 12:08:41 +0000 (14:08 +0200)]
ssh: Prefer algorithms of the known host keys

JSch prefers ssh-rsa key type. When the remote server supports ssh-rsa
key type then this key type will be used even if the known_hosts file
contains a host key for that host, but with different key type.
This caused an unexpected UnknownHostKey error.

To fix the issue first scan the known_hosts, the HostKeyRepository in
JSch API, for any already existing host keys for the target host and
modify the default session settings to prefer their algorithms. However,
do this only if there is no HostKeyAlgorithms setting active.

Change-Id: I236df2a860ddd9289a0a820ddf09c2dea3673d36

6 years agoConfigure classpath for separate test sources in Eclipse 73/130673/2
Michael Keppler [Tue, 9 Oct 2018 07:15:35 +0000 (09:15 +0200)]
Configure classpath for separate test sources in Eclipse

Eclipse Photon supports separating sources and test sources.

There are no functional changes in the IDE, except for test source
folders having a different icon color.

Users of different IDEs than Eclipse are not affected, since the
attribute on the classpath entries will be ignored by their IDE.

Bug: 539933
Change-Id: Iac6dcdf0c0730ca775bae90df6a685303dc95380
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDisable Eclipse warning about unrecognized @SuppressWarnings value 29/131029/1
David Pursehouse [Wed, 17 Oct 2018 01:40:36 +0000 (10:40 +0900)]
Disable Eclipse warning about unrecognized @SuppressWarnings value

The code base has several @SuppressWarnings annotations to suppress
warnings raised by Error Prone, but those are not recognized by
Eclipse and there is currently no way to tell it about them [1].

Suppress them for now.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392045

Change-Id: I3de7cfa8ad4370ca5be71e1303879c73ab6829c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUnionInputStreamTest: Suppress ErrorProne warning about missing synchronized 26/130826/3
David Pursehouse [Fri, 12 Oct 2018 02:07:48 +0000 (11:07 +0900)]
UnionInputStreamTest: Suppress ErrorProne warning about missing synchronized

Error Prone reports that the unsynchronized method skip overrides the
synchronized method in ByteArrayInputStream [1].

This is a test class, so we can just suppress the warning as recommended
in [1].

Note that the suppression causes a warning in Eclipse, because it doesn't
recognize the "UnsynchronizedOverridesSynchronized" as a valid value for
the @SuppressWarnings annotation [2].

[1] https://errorprone.info/bugpattern/UnsynchronizedOverridesSynchronized
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392045

Change-Id: I3e798b448211f1363729091f72fb0ef6a873e599
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "Upgrade spotbugs to 3.1.7"
David Pursehouse [Tue, 16 Oct 2018 23:34:04 +0000 (19:34 -0400)]
Merge "Upgrade spotbugs to 3.1.7"

6 years agoUploadPack: Use request instead of field for clientShallowCommits 54/129754/4
Ivan Frade [Tue, 18 Sep 2018 23:06:52 +0000 (16:06 -0700)]
UploadPack: Use request instead of field for clientShallowCommits

Yet another member to field transition.

Change-Id: Ic801f4ac3a270b287591ef3cf722c399126ccdd4
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUploadPack: Use request instead of field for depth 53/129753/4
Ivan Frade [Tue, 18 Sep 2018 22:52:48 +0000 (15:52 -0700)]
UploadPack: Use request instead of field for depth

One more step in removing state from UploadPack, using the request
object instead.

Unfortunately, hooks get from UploadPack information about the current
request. Changing the hooks to receive the request is a public API
change, so at the moment lets keep a reference to the current request.

This kills half the benefit of using a request object vs fields, but
at least we still get better modularity.

Change-Id: I86803d876a621b727c66ee73f2880c93190629e9
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUploadPack: Use request instead of field for shallowSince 23/131023/3
Ivan Frade [Tue, 16 Oct 2018 21:16:35 +0000 (14:16 -0700)]
UploadPack: Use request instead of field for shallowSince

Change-Id: I1b9fdb6c58c574f66dbd152c1049ddcd52cc1683
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUploadPack: Use request in computeShallowUnshallow 52/129752/3
Ivan Frade [Tue, 16 Oct 2018 20:56:43 +0000 (13:56 -0700)]
UploadPack: Use request in computeShallowUnshallow

All data required in this function is available in the request object.
Use that object instead of class members. This reduces class state and
is more readable.

Make the function use a request object and remove the now unnecessary
field "deepenNotRefs".

Change-Id: If861e44c2860a78cf19f456d1b3feb7ddc314cce
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoMove deepenSince and deepenNotRefs up to FetchRequest 21/131021/2
Ivan Frade [Tue, 16 Oct 2018 19:51:00 +0000 (12:51 -0700)]
Move deepenSince and deepenNotRefs up to FetchRequest

These properties are protocol v2 specific, but they have clear default
no-op values and having them in the common superclass simplifies client
code.

Move properties deepenSince and deepenNotRefs up to FetchRequest. In
FetchV0Request, they are initialized with their no-op values (0 for
deepenSince and empty list for deepenNotRefs)

Change-Id: I9d46a6dfbe29ebd794b5a6482033cdc70d411a23
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUploadPack: Use request instead of field for filterBlobLimt 51/129751/2
Ivan Frade [Tue, 18 Sep 2018 21:58:44 +0000 (14:58 -0700)]
UploadPack: Use request instead of field for filterBlobLimt

filterBlobLimit is not part of the UploadPack state, and as field
of the class is difficult to see where it is set or accessed.

Use the request object instead of a field. This reduces
UploadPack state and makes clearer how the value is used.

Change-Id: I96a04a5a8b31bf2243de701e1fd7ebb4080b49e2
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoMark fetch requests fields as final and @NonNull when possible 57/130957/3
Ivan Frade [Mon, 15 Oct 2018 23:49:13 +0000 (16:49 -0700)]
Mark fetch requests fields as final and @NonNull when possible

Mark reference fields as final, annotate constructor parameters and
getters as @NonNull when appropiate and assert the incoming references
are non-null.

Change-Id: I0ef9a513a99313bf461fe9629ce6cc8b409bdedb
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUpgrade spotbugs to 3.1.7 66/130966/1
David Pursehouse [Tue, 16 Oct 2018 09:38:34 +0000 (18:38 +0900)]
Upgrade spotbugs to 3.1.7

Change-Id: I2bfeccafe01cf249ac536ded16be734e28cf4ff0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCreate FetchRequest superclass with common elements 50/129750/6
Ivan Frade [Mon, 15 Oct 2018 19:19:41 +0000 (12:19 -0700)]
Create FetchRequest superclass with common elements

Some code apply to both, v1 and v2 requests, so it should receive
just a request instance.

Move all common fields to an abstract superclass that can be passed
to "version neutral" functions.

Change-Id: I47c22fb12065bc93767f78175e2b36cc43ccb5c5
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoRename Fetch V2 request wantsIds and options 54/130954/2
Ivan Frade [Mon, 15 Oct 2018 19:43:29 +0000 (12:43 -0700)]
Rename Fetch V2 request wantsIds and options

In FetchV0Request, the fields "wantsIds" and "options" are called
"wantIds" and "clientCapabilities". Those names describe them better.

Rename FetchV2Request fields to follow fetch v0. This will make easier
to extract a superclass later.

Take also the chance to polish the javadoc.

Change-Id: Ia17dbbab8084f39cc529fef9ca5c65e189073767
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoMove protocol v0/v1 parsing to its own class and request objects 59/129459/18
Ivan Frade [Tue, 28 Aug 2018 20:57:52 +0000 (13:57 -0700)]
Move protocol v0/v1 parsing to its own class and request objects

Protocol v0/v1 parsing code doesn't have any real dependency on UploadPack.

Move it to its class and use a request object to read the data in
UploadPack.

This makes the code easier to test, keeps similar structure than protocol v2,
reduces the line count of UploadPack and paves the way to remove the
members as implicit parameters in it.

Change-Id: I8188da8bd77e90230a7e37c02d800ea18463694f
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoInternalPushConnection: don't swallow RuntimeException 91/130691/5
Han-Wen Nienhuys [Tue, 9 Oct 2018 14:22:06 +0000 (16:22 +0200)]
InternalPushConnection: don't swallow RuntimeException

Uncaught exceptions are handled by java.lang.Thread's handler, which
prints it to stderr.

This is useful because InternalPushConnection is used in tests, and
during development, the server side may have programming errors that
manifest as RuntimeExceptions.

Before this change, all types of failures would lead to a uniform
failure message "test://test/conn0: push not permitted" on the client.

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

6 years agoFix file handle leak in ObjectDownloadListener.onWritePossible 04/130804/5
Matthias Sohn [Thu, 11 Oct 2018 12:42:28 +0000 (14:42 +0200)]
Fix file handle leak in ObjectDownloadListener.onWritePossible

5c134f4d removed closing the input stream when we reached end of the
stream. This caused file handle leaks.

Bug: 540049
Change-Id: I48082b537077c7471fc160f59aa04deb99687d9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.6' into stable-4.7 64/130864/2
David Pursehouse [Sat, 13 Oct 2018 00:18:03 +0000 (09:18 +0900)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs

Change-Id: I24417e4ebbba31f7ff6896d585ef807327411392
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.5' into stable-4.6 63/130863/2
David Pursehouse [Sat, 13 Oct 2018 00:16:55 +0000 (09:16 +0900)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml
  Replace FindBugs with SpotBugs

Change-Id: I1c077e8f3530ac717b1603d3307fd15d4335b8fe
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReplace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml 65/130865/1
David Pursehouse [Sat, 13 Oct 2018 00:14:57 +0000 (09:14 +0900)]
Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml

Change-Id: If9cb0de7a0e7bd95eac7daeee140a18385192a48
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "Upgrade maven-surefire plugins to 2.22.1"
David Pursehouse [Sat, 13 Oct 2018 00:08:58 +0000 (20:08 -0400)]
Merge "Upgrade maven-surefire plugins to 2.22.1"

6 years agoFirstWant: tighten first-want line validation 20/130820/9
Ivan Frade [Thu, 11 Oct 2018 00:02:49 +0000 (17:02 -0700)]
FirstWant: tighten first-want line validation

First-want line parsing accepts lines with an optional whitespace, when
the spec is strict requiring a white space.

Validate the line enforcing that there is a white space between oid and
capabilities list.

Change-Id: I45ada67030e0720f9b402c298be18c7518c799b1
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoMerge "Move first line parsing for v0/v1 pack negotiation out of UploadPack"
Jonathan Nieder [Fri, 12 Oct 2018 21:23:32 +0000 (17:23 -0400)]
Merge "Move first line parsing for v0/v1 pack negotiation out of UploadPack"

6 years agoMove first line parsing for v0/v1 pack negotiation out of UploadPack 90/129590/18
Ivan Frade [Mon, 17 Sep 2018 18:48:48 +0000 (11:48 -0700)]
Move first line parsing for v0/v1 pack negotiation out of UploadPack

In protocol v0/v1 pack negotiation, the first want line contains the
options the client wants in effect. This parsing is done in UploadPack
but it doesn't have any interaction with that class.

Move the code to its own class and package, mark the current one
as deprecated (it is public API) and add unit tests.

Take the chance to move the parsing code from the constructor to a
factory method, making the class a simple container of results.

Change-Id: I1757f535dda78a4111a1c12c3a3b455a4b6f0c51
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoUpgrade maven-surefire plugins to 2.22.1 36/130836/1
David Pursehouse [Fri, 12 Oct 2018 09:55:38 +0000 (18:55 +0900)]
Upgrade maven-surefire plugins to 2.22.1

Change-Id: Ic53997223de82b8e0c4df96624889ffb9715822a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpgrade error_prone_core to 2.3.2 94/130794/1
David Pursehouse [Thu, 11 Oct 2018 10:38:29 +0000 (19:38 +0900)]
Upgrade error_prone_core to 2.3.2

Change-Id: Icd9b08ad0c922e3e0a436f2a0a7fd60019ee22ae
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoPackOutputStream: Suppress Error Prone's ShortCircuitBoolean warning 75/130275/4
David Pursehouse [Tue, 2 Oct 2018 04:06:24 +0000 (13:06 +0900)]
PackOutputStream: Suppress Error Prone's ShortCircuitBoolean warning

The usage of non-short-circuit logic is intentional, per the inline
comment added in change Ib4b35e357 as a follow-up to Ie3761ffb4 which
was a previously rejected attempt to "fix" a similar warning that had
been raised by FindBugs.

Change-Id: I3f6729f954d45d30ce697356d2ab3cc877d3ad54
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdd missing @since tags for ObjectChecker.ErrorType 32/130732/1
Matthias Sohn [Wed, 10 Oct 2018 09:24:30 +0000 (11:24 +0200)]
Add missing @since tags for ObjectChecker.ErrorType

Change-Id: I4d0cd25d6cfaf8b81e58f35e58890ac580eaf9c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRevert "Remove unused API problem filters" 31/130731/1
Matthias Sohn [Wed, 10 Oct 2018 09:26:00 +0000 (11:26 +0200)]
Revert "Remove unused API problem filters"

This reverts commit 37c7fbd661085f28252580479129a996a9f3b0f1.

These filters weren't unused. Without them Eclipse raises 4 API errors.

Change-Id: I5ce443d40b5f517be4a315479e81246d40af1983
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoBazel: Require minimum bazel version 0.17.1 18/130718/2
David Pursehouse [Wed, 10 Oct 2018 01:53:35 +0000 (10:53 +0900)]
Bazel: Require minimum bazel version 0.17.1

Check the bazel version using the checker from bazel_skylib, and
require at least version 0.17.1 which is the minimum version that
does not suffer from the Java API mismatch issue [1].

The implementation is borrowed from the Gerrit project.

[1] https://github.com/bazelbuild/bazel/issues/6027

Change-Id: I224250088a1f5072fcaa3ec81228f4d2cb8cb389
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "ValidRefNameTest#testNormalizeBranchName: Fix string/ref equality check"
David Pursehouse [Wed, 10 Oct 2018 02:07:14 +0000 (22:07 -0400)]
Merge "ValidRefNameTest#testNormalizeBranchName: Fix string/ref equality check"

6 years agoRemove unused API problem filters 17/130717/2
David Pursehouse [Tue, 9 Oct 2018 23:57:03 +0000 (08:57 +0900)]
Remove unused API problem filters

Change-Id: I4fb1d2cf1cea92dd314edc776ddbaa6640c99cf1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoValidRefNameTest#testNormalizeBranchName: Fix string/ref equality check 77/130277/3
David Pursehouse [Tue, 2 Oct 2018 04:17:51 +0000 (13:17 +0900)]
ValidRefNameTest#testNormalizeBranchName: Fix string/ref equality check

Change-Id: Ibffb0dcaab6ec033b1b69aa27ccb7fdaa32fa925
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge changes from topic 'maven-plugin-updates'
David Pursehouse [Wed, 10 Oct 2018 00:22:27 +0000 (20:22 -0400)]
Merge changes from topic 'maven-plugin-updates'

* changes:
  Upgrade wagon-ssh to 3.2.0
  Upgrade maven-jxr-plugin to 3.0.0
  Upgrade maven-shade-plugin to 3.2.0
  Upgrade jacoco-maven-plugin to 0.8.2
  Upgrade maven-project-info-reports-plugin to 3.0.0
  Upgrade maven-enforcer-plugin to 3.0.0-M2
  Upgrade maven surefire plugins to 2.22.0
  Ensure same version of maven-surefire-plugin and maven-surefire-report-plugin

6 years agoFormat @NonNull on return value as method annotation 16/130716/1
Jonathan Nieder [Tue, 9 Oct 2018 22:56:55 +0000 (15:56 -0700)]
Format @NonNull on return value as method annotation

For example, instead of using

public @NonNull String getMyFavoriteString() { ... }

use

@NonNull
public String getMyFavoriteString() { ... }

This makes the style more consistent (the existing JGit code base
tends to lean toward the second style) and makes the source code
better reflect how the annotation is parsed, as a METHOD annotation.

Longer term, we should switch to a TYPE_USE annotation and switch to
the first style.

Noticed using a style checker that follows
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations

Change-Id: I9b9fa08035d805ca660520f812a84d2f47eff507
Reported-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoFormat @Nullable on return value as method annotation 15/130715/1
Jonathan Nieder [Tue, 9 Oct 2018 22:48:16 +0000 (15:48 -0700)]
Format @Nullable on return value as method annotation

For example, instead of using

public @Nullable String getMyFavoriteString() { ... }

use

@Nullable
public String getMyFavoriteString() { ... }

This makes the style more consistent (the existing JGit code base
tends to lean toward the second style) and makes the source code
better reflect how the annotation is parsed, as a METHOD annotation.

Longer term, we should switch to a TYPE_USE annotation and switch to
the first style.

Noticed using a style checker that follows
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations

Change-Id: I07f4e67cc149fb8007f696a4663e10d4bfc57e3a
Reported-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoAvoid using @Nullable to annotate arrays 14/130714/3
Jonathan Nieder [Tue, 9 Oct 2018 22:29:00 +0000 (15:29 -0700)]
Avoid using @Nullable to annotate arrays

As described in the javadoc for org.eclipse.jgit.annotations.Nullable:

  Warning: Please do not use this annotation on arrays. Different
  annotation processors treat `@Nullable Object[]` differently: some
  treat it as an array of nullable objects, for consistency with
  versions of `Nullable` defined with `@Target TYPE_USE`, while others
  treat it as a nullable array of objects. JGit therefore avoids using
  this annotation on arrays altogether.

  See the checker-framework manual[1] for details.

  [1] http://types.cs.washington.edu/checker-framework/current/checker-framework-manual.html#faq-array-syntax-meaning

Change-Id: I14ffcf80adbb8145d797998de2f2fa6ab84c3ae3
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoFsckError: Use @Nullable as field annotation (before any modifier) 12/130712/1
Ivan Frade [Tue, 9 Oct 2018 21:38:15 +0000 (14:38 -0700)]
FsckError: Use @Nullable as field annotation (before any modifier)

More consistent with general coding style.

Change-Id: Idd0695c63d0b4a17640460e8c388ce12e952879a
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoDfsFsck: Check that .gitmodules in the repository have valid contents 17/130517/8
Ivan Frade [Mon, 8 Oct 2018 22:42:47 +0000 (15:42 -0700)]
DfsFsck: Check that .gitmodules in the repository have valid contents

Previous commits block the addition to the repo of dangerous .gitmodules
files, but some could have been committed before those safeguards where
in place.

Add a check in DfsFsck to validate the .gitmodules files in the repo.
Use the same validation than the ReceivePack, translating the
results to FsckErrors.

Note that *all* .gitmodules files in the storage will be checked, not
only the latest version.

Change-Id: I040cf1f31a779419aad0292ba5e6e76eb7f32b66
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoFsckError.CorruptObject: Use @Nullable constructor for errorType 56/130656/4
Ivan Frade [Mon, 8 Oct 2018 21:43:17 +0000 (14:43 -0700)]
FsckError.CorruptObject: Use @Nullable constructor for errorType

errorType is already null in the caller and callee when unknown, so we
can replace a conditional call to a setter in the only caller with an
unconditionally provided @Nullable constructor parameter.

As a bonus, this lets us mark the field as final.

Change-Id: Ie2f929180e74ffa1aba8ec6caccfa81fbd8bfc04
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoSubmoduleValidator: Always throw SubmoduleValidationException 48/130648/5
Ivan Frade [Mon, 8 Oct 2018 20:37:42 +0000 (13:37 -0700)]
SubmoduleValidator: Always throw SubmoduleValidationException

The fsck test needs more detail about the error than an IOException
with an explanatory message.

Add an error identifier to the SubmoduleValidatorException and make
it the only throwable exception when parsing a file.

Change-Id: Ic3f0955b497e1681b25e681e1282e876cdf3d2c5
Signed-off-by: Ivan Frade <ifrade@google.com>
6 years agoReplace FindBugs with SpotBugs 66/130666/1
David Pursehouse [Tue, 9 Oct 2018 01:11:25 +0000 (10:11 +0900)]
Replace FindBugs with SpotBugs

SpotBugs [1] is the spiritual successor of FindBugs, carrying on from
the point where it left off with support of its community.

This is a backport of [1] which originally did the replacement on the
master branch. This change updates to the current latest version, so
that we can get the benefit of its checks when pushing changes to the
stable branches.

[1] https://spotbugs.github.io/
[2] https://git.eclipse.org/r/#/c/101312/

Change-Id: Ib73d56b5980b55f4d7e09d87abec3138cac3d3dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-5.1' 55/130655/2
Jonathan Nieder [Mon, 8 Oct 2018 23:42:09 +0000 (23:42 +0000)]
Merge branch 'stable-5.1'

* stable-5.1:
  SubmoduleValidator: Remove unused import of ConfigConstants
  SubmoduleValidator: Permit missing path or url

Change-Id: Ie0e35231c81a0c53c2051c4c123a5210b5a1c6d3
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-5.0' into stable-5.1 54/130654/2
Jonathan Nieder [Mon, 8 Oct 2018 23:41:38 +0000 (23:41 +0000)]
Merge branch 'stable-5.0' into stable-5.1

* stable-5.0:
  SubmoduleValidator: Remove unused import of ConfigConstants
  SubmoduleValidator: Permit missing path or url

Change-Id: Iaa3160a1307777cc4233d82e50a57c63d75d141c
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.11' into stable-5.0 53/130653/2
Jonathan Nieder [Mon, 8 Oct 2018 23:41:15 +0000 (23:41 +0000)]
Merge branch 'stable-4.11' into stable-5.0

* stable-4.11:
  SubmoduleValidator: Remove unused import of ConfigConstants
  SubmoduleValidator: Permit missing path or url

Change-Id: Iaf3b994e763bd02054b820cd87fe68ff83675001
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.10' into stable-4.11 52/130652/2
Jonathan Nieder [Mon, 8 Oct 2018 23:40:47 +0000 (23:40 +0000)]
Merge branch 'stable-4.10' into stable-4.11

* stable-4.10:
  SubmoduleValidator: Remove unused import of ConfigConstants
  SubmoduleValidator: Permit missing path or url

Change-Id: Id74c837d6cb728439ccbd6ade71936b493c09e08
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.9' into stable-4.10 51/130651/2
Jonathan Nieder [Mon, 8 Oct 2018 23:40:05 +0000 (23:40 +0000)]
Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  SubmoduleValidator: Remove unused import of ConfigConstants
  SubmoduleValidator: Permit missing path or url

Change-Id: Ib3c311f1e8d2db95510292a72f2f49825ffce9d9
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 64/130664/1
Jonathan Nieder [Mon, 8 Oct 2018 23:39:18 +0000 (23:39 +0000)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  SubmoduleValidator: Remove unused import of ConfigConstants

Change-Id: Id01fd9945e23a9343f96c42db89d5a1b302dad33
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 63/130663/1
Jonathan Nieder [Mon, 8 Oct 2018 23:38:59 +0000 (23:38 +0000)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  SubmoduleValidator: Remove unused import of ConfigConstants

Change-Id: I6a7d19602d6d9099928ee52de727743b9717f262
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoSubmoduleValidator: Remove unused import of ConfigConstants 62/130662/1
David Pursehouse [Mon, 8 Oct 2018 23:29:26 +0000 (08:29 +0900)]
SubmoduleValidator: Remove unused import of ConfigConstants

Change-Id: I6afe5690bf9d1f1f4d414aa618daefc8b48d217e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 50/130650/1
Jonathan Nieder [Mon, 8 Oct 2018 21:49:24 +0000 (21:49 +0000)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  SubmoduleValidator: Permit missing path or url

Change-Id: I989ac2c0c124c82385fc7cac7e0544ec225f7589
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 49/130649/1
Jonathan Nieder [Mon, 8 Oct 2018 21:49:09 +0000 (21:49 +0000)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  SubmoduleValidator: Permit missing path or url

Change-Id: I94fdaf45abbf7665f9eddc14b1a7f7144aafeadf
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoSubmoduleValidator: Permit missing path or url 76/130576/2
Jonathan Nieder [Sun, 7 Oct 2018 21:55:52 +0000 (21:55 +0000)]
SubmoduleValidator: Permit missing path or url

A .gitmodules file can include a submodule without a path to configure
the URL for a submodule that is only present on other branches.

A .gitmodules file can include a submodule with no URL and no path to
reserve the name for a submodule that existed in earlier history but
is not available from any URL any more.

"git fsck" permits both of these cases.  Permit them in JGit as well
(instead of throwing NullPointerException).

Change-Id: I3b442639ad79ea7a59227f96406a12e62d3573ae
Reported-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
6 years agoRefAdvertiser: Add Javadoc for usage of send(Collection) 84/130584/1
Michael Keppler [Mon, 8 Oct 2018 06:45:11 +0000 (08:45 +0200)]
RefAdvertiser: Add Javadoc for usage of send(Collection)

This was not updated with the original introduction of the new method.

Bug: 534731
Change-Id: Ic4589c3a209109a829fbb706a9bf38845134e904
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>