]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoMake Config.readIncludedConfig a noop by default 71/113371/2
Shawn Pearce [Thu, 14 Dec 2017 01:35:38 +0000 (17:35 -0800)]
Make Config.readIncludedConfig a noop by default

The Config class must be safe to run against untrusted input files.
Reading arbitrary local system paths using include.path is risky for
servers, including Gerrit Code Review.  Return null by default to
incide the include should be ignored.

Only FileBasedConfig which originated from local disk should be trying
to read local system paths.  FileBasedConfig already overrides this
method with its own implementation.

Change-Id: I2ff31753868aa1bbac4a6843a4c23e50bd6f46f3

6 years agoDfsBlockCache.hasBlock0: quickly check for file in cache 70/113370/1
Shawn Pearce [Thu, 14 Dec 2017 01:10:51 +0000 (17:10 -0800)]
DfsBlockCache.hasBlock0: quickly check for file in cache

This can be useful for sophisticated pre-read algorithms to quickly
determine if a file is likely already in cache, especially small
reftables which may be smaller than a typical DFS block size.

Change-Id: I7756948063b722ff650c9ba82060ff9ad554b0ba

6 years agoMerge branch 'stable-4.9' 85/113285/1
David Pursehouse [Wed, 13 Dec 2017 00:51:44 +0000 (09:51 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  TransportCommand#setTimeout: Specify units for timeout in Javadoc
  Fix typo in key of a JGitText externalized string

Change-Id: Icb60537d2e99cb6e928d9fe07f66695ed69081b5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpdpate oxygen orbit to R20170919201930 and remove old orbit repos 66/112766/3
Matthias Sohn [Sun, 3 Dec 2017 10:11:22 +0000 (11:11 +0100)]
Updpate oxygen orbit to R20170919201930 and remove old orbit repos

Change-Id: I2bf09cc3b08ebc762390e2892b966b11027e2e89
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove use of deprecated X509HostnameVerifier 65/112765/3
Matthias Sohn [Fri, 1 Dec 2017 23:03:42 +0000 (00:03 +0100)]
Remove use of deprecated X509HostnameVerifier

Change-Id: I318f5457ade3d11b2ac1c99f6ef382a0a147a352
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoUpdate Apache httpclient to 4.5.2 and httpcore to 4.4.6 64/112764/3
Matthias Sohn [Sun, 3 Dec 2017 10:04:41 +0000 (11:04 +0100)]
Update Apache httpclient to 4.5.2 and httpcore to 4.4.6

CQ: 15051
CQ: 15052
Change-Id: I532cd73253601ce1d2926850af2519aae6744a9c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove unused API filters 34/112934/2
David Pursehouse [Wed, 6 Dec 2017 10:48:36 +0000 (19:48 +0900)]
Remove unused API filters

Change-Id: Ie8bfa4e8473c2a68a6308de7dbf29ccbca97495d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportCommand#setTimeout: Specify units for timeout in Javadoc 97/113197/1
David Turner [Mon, 11 Dec 2017 20:20:25 +0000 (15:20 -0500)]
TransportCommand#setTimeout: Specify units for timeout in Javadoc

Change-Id: Iadf0e2c6483794e43a5326f6be6bb34c19b00564
Signed-off-by: David Turner <dturner@twosigma.com>
6 years agoFix typo in key of a JGitText externalized string 27/113127/1
Matthias Sohn [Sun, 10 Dec 2017 17:33:23 +0000 (18:33 +0100)]
Fix typo in key of a JGitText externalized string

Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix typo in key of a JGitText externalized string 24/113124/1
Matthias Sohn [Sun, 10 Dec 2017 17:33:23 +0000 (18:33 +0100)]
Fix typo in key of a JGitText externalized string

Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' 23/113123/1
Matthias Sohn [Sun, 10 Dec 2017 17:10:25 +0000 (18:10 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  Fix IllegalThreadStateException if stderr closed without exiting

Change-Id: I8a6a6788c2bb000171233b88d9592ed0640ad15e

6 years agoFix IllegalThreadStateException if stderr closed without exiting 22/113122/1
Dmitry Pavlenko [Thu, 7 Dec 2017 18:36:35 +0000 (19:36 +0100)]
Fix IllegalThreadStateException if stderr closed without exiting

If some process executed by FS#readPipe lived for a while after
closing stderr, FS#GobblerThread#run failed with an
IllegalThreadStateException exception when accessing p.exitValue()
for the process which is still alive.

Add Process#waitFor calls to wait for the process completion.

Bug: 528335
Change-Id: I87e0b6f9ad0b995dbce46ddfb877e33eaf3ae5a6
Signed-off-by: Dmitry Pavlenko <pavlenko@tmatesoft.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "URIishTest: more Windows file-protocol tests"
Thomas Wolf [Sat, 9 Dec 2017 21:27:18 +0000 (16:27 -0500)]
Merge "URIishTest: more Windows file-protocol tests"

6 years agoURIishTest: more Windows file-protocol tests 83/113083/2
Marc Strapetz [Sat, 9 Dec 2017 11:12:24 +0000 (12:12 +0100)]
URIishTest: more Windows file-protocol tests

Change-Id: Id5fbd8bb9cd05da89d27e9532612d64ae84a55ba
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoPackInserterTest: Prevent potential NPE dereferencing Path.getFileName() 49/113049/1
David Pursehouse [Fri, 8 Dec 2017 08:21:35 +0000 (17:21 +0900)]
PackInserterTest: Prevent potential NPE dereferencing Path.getFileName()

Path.getFileName() may return null if the path has zero elements.

Enclose the dereference in a null-check.

Change-Id: I7ea3d3f07edc13a80b593d28e8fd512a4e1ed56b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCloneCommand: Refactor listing of files in deleteChildren 48/113048/1
David Pursehouse [Fri, 8 Dec 2017 08:13:10 +0000 (17:13 +0900)]
CloneCommand: Refactor listing of files in deleteChildren

File.listFiles() returns null if the given File does not represent a
directory, so we can just test for null instead of making a separate
call to FS.DETECTED.isDirectory()

This also avoids a false-positive error from SpotBugs which claims
that there is a potential null-pointer exception on dereferencing the
result of Files.listFiles().

Change-Id: I18e09e391011db997470f5a09d8e38bb604c0213
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSpecify consistent version range for junit in OSGi manifests 38/113038/2
David Pursehouse [Thu, 7 Dec 2017 22:29:51 +0000 (07:29 +0900)]
Specify consistent version range for junit in OSGi manifests

There are several different version ranges specified in the various
manifest files.

Align them all to the same range:  [4.12,5.0.0)

Change-Id: I02205b8b8546c9f53ed431b5fd9abf6ddcda4423
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 46/113046/1
David Pursehouse [Fri, 8 Dec 2017 07:57:52 +0000 (16:57 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  LfsServerText: Fix formatting of invalidPathInfo message
  InvalidLongObjectIdException: Fix formatting of message
  FileLfsServlet: Do not pretty print json response

Change-Id: Ib59431865a45659fe9d91e2556b9d1ce49e3808a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLfsServerText: Fix formatting of invalidPathInfo message 41/113041/1
David Pursehouse [Thu, 7 Dec 2017 01:18:21 +0000 (10:18 +0900)]
LfsServerText: Fix formatting of invalidPathInfo message

The message is formatted as:

  Invalid pathInfo '/abc' does not match '/{SHA-256}'

but should be:

  Invalid pathInfo: '/abc' does not match '/{SHA-256}'

(i.e. including a colon) to be consistent with other messages.

Change-Id: Ic38aa7d33dd02d7954b95c331a73919a90c69991
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInvalidLongObjectIdException: Fix formatting of message 40/113040/1
David Pursehouse [Thu, 7 Dec 2017 00:51:56 +0000 (09:51 +0900)]
InvalidLongObjectIdException: Fix formatting of message

The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Do not pretty print json response 39/113039/1
David Pursehouse [Wed, 6 Dec 2017 23:25:50 +0000 (08:25 +0900)]
FileLfsServlet: Do not pretty print json response

Pretty printing the response is useful for human readers, but most
(if not all) of the time, the response will be read by programs.

Remove it to avoid the additional overhead of the formatting and
extra bytes in the response. Adjust the test accordingly.

Note that LfsProtocolServlet already doesn't use pretty printing,
so this change makes FileLfsServlet's behavior consistent. In fact,
both classes now have duplicate Gson handling; this will be cleaned
up in a separate change.

Change-Id: I113a23403f9222f16e2c0ddf39461398b721d064
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDfsBlockCache#creditSpace: release clockLock in finally block 91/112991/2
David Pursehouse [Thu, 7 Dec 2017 08:25:58 +0000 (17:25 +0900)]
DfsBlockCache#creditSpace: release clockLock in finally block

Enclose the call to getStat in a `try`, and release the previously
acquired lock in the `finally`. This prevents that the lock is left
unreleased in the case of an exception being raised in getStat.

Change-Id: I17b4cd134dae887e23a1165253be0ac2d4fd452c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveTest: Check result of BufferedInputStream#skip 89/112989/2
David Pursehouse [Thu, 7 Dec 2017 07:49:47 +0000 (16:49 +0900)]
ArchiveTest: Check result of BufferedInputStream#skip

Change-Id: I5168c75ca2dda6d1e8c8a6c29043ac781fe9295a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFS_POSIX: Fix boxing/unboxing of Boolean 88/112988/2
David Pursehouse [Thu, 7 Dec 2017 07:30:01 +0000 (16:30 +0900)]
FS_POSIX: Fix boxing/unboxing of Boolean

Boolean is being abused to represent three possible states of atomic
file creation support (true/enabled, false/disabled, null/undefined).

Replace this with an enum of the three explicit states.

Change-Id: I2cd7fa6422311dc427823304b082ce8da50d2fbe
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUse constants from StandardCharsets instead of hard-coded strings 80/112980/5
David Pursehouse [Thu, 7 Dec 2017 01:23:38 +0000 (10:23 +0900)]
Use constants from StandardCharsets instead of hard-coded strings

Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and
"ISO-8859-1", use the corresponding constants from StandardCharsets.

UnsupportedEncodingException is not thrown when the StandardCharset
constants are used, so remove the now redundant handling.

Because the encoding names are no longer hard-coded strings, also
remove redundant $NON-NLS warning suppressions.

Also replace existing usages of the constants with static imports.

Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLfsServerText: Fix formatting of invalidPathInfo message 79/112979/4
David Pursehouse [Thu, 7 Dec 2017 01:18:21 +0000 (10:18 +0900)]
LfsServerText: Fix formatting of invalidPathInfo message

The message is formatted as:

  Invalid pathInfo '/abc' does not match '/{SHA-256}'

but should be:

  Invalid pathInfo: '/abc' does not match '/{SHA-256}'

(i.e. including a colon) to be consistent with other messages.

Change-Id: Ic38aa7d33dd02d7954b95c331a73919a90c69991
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInvalidLongObjectIdException: Fix formatting of message 77/112977/3
David Pursehouse [Thu, 7 Dec 2017 00:51:56 +0000 (09:51 +0900)]
InvalidLongObjectIdException: Fix formatting of message

The message is formatted as:

  Invalid id: : abcde...

but should be:

  Invalid id: abcde...

Change-Id: Ie15cacdcf2f168edaee262e6cf8061ebfe9d998d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMove repeated LFS Gson handling to common class 76/112976/3
David Pursehouse [Wed, 6 Dec 2017 15:00:52 +0000 (00:00 +0900)]
Move repeated LFS Gson handling to common class

LfsProtocolServlet and FileLfsServlet both implement the same
setup of the Gson object.

Factor it out to a common class and reuse it.

Change-Id: I5696404fad140cbff1b712ebb04a7e8bba60e4b4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDownloadTest: Use ExpectedException instead of try..catch..fail 75/112975/2
David Pursehouse [Wed, 6 Dec 2017 23:42:39 +0000 (08:42 +0900)]
DownloadTest: Use ExpectedException instead of try..catch..fail

Change-Id: I5547e64de6cea3d2200887b504245c69692f00b5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Do not pretty print json response 74/112974/1
David Pursehouse [Wed, 6 Dec 2017 23:25:50 +0000 (08:25 +0900)]
FileLfsServlet: Do not pretty print json response

Pretty printing the response is useful for human readers, but most
(if not all) of the time, the response will be read by programs.

Remove it to avoid the additional overhead of the formatting and
extra bytes in the response. Adjust the test accordingly.

Note that LfsProtocolServlet already doesn't use pretty printing,
so this change makes FileLfsServlet's behavior consistent. In fact,
both classes now have duplicate Gson handling; this will be cleaned
up in a separate change.

Change-Id: I113a23403f9222f16e2c0ddf39461398b721d064
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 72/112972/1
David Pursehouse [Wed, 6 Dec 2017 23:13:45 +0000 (08:13 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  LfsStore: Make inner class AppServer static
  DirCacheCheckout#processEntry: Fix typo in javadoc

Change-Id: Id8e4a3c4dc741e6e0182522e72ecb4b34ae419eb

6 years agoTransportHttp: retry on IOException with another mechanism 71/111671/4
Thomas Wolf [Wed, 15 Nov 2017 22:23:27 +0000 (23:23 +0100)]
TransportHttp: retry on IOException with another mechanism

When a 401 occurs on POST and the server advertises Negotiate, we
may get an exception from GSSAPI if the client isn't configured
at all for Kerberos.

Add exception logic similar to the GET case: keep trying other
authentication mechanisms if this occurs.

Bug: 501167
Change-Id: Ic3a3368378d4b3408a35aec93e78ef425d54b3e4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoLfsStore: Make inner class AppServer static 51/112951/1
David Pursehouse [Wed, 6 Dec 2017 14:27:09 +0000 (23:27 +0900)]
LfsStore: Make inner class AppServer static

FindBugs reports:

  This class is an inner class, but does not use its embedded reference
  to the object which created it. This reference makes the instances
  of the class larger, and may keep the reference to the creator object
  alive longer than necessary. If possible, the class should be made
  static.

Change-Id: I245e44678166176de0cfb275e22ddd159f88e0bd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCheckout#processEntry: Fix typo in javadoc 36/112936/1
David Pursehouse [Wed, 6 Dec 2017 10:59:55 +0000 (19:59 +0900)]
DirCacheCheckout#processEntry: Fix typo in javadoc

Change-Id: Ie08a6275f4656ebb46abe8748b73b0fb52a98a35
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoConfigTest: Move pathToString to FileUtils 41/112841/3
David Pursehouse [Tue, 5 Dec 2017 01:37:26 +0000 (10:37 +0900)]
ConfigTest: Move pathToString to FileUtils

ConfigTest#pathToString is not visible to FileBasedConfigTest when
bulding with bazel.

Move it to FileUtils rather than messing about with the bazel build
rules to make it visible.

Change-Id: Idcfd4822699dac9dc4a426088a929a9cd31bf53f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileBasedConfig: support for relative includes 48/111848/5
Marc Strapetz [Sat, 18 Nov 2017 16:50:30 +0000 (17:50 +0100)]
FileBasedConfig: support for relative includes

Relative include.path are now resolved against the config's parent
directory. include.path starting with ~/ are resolved against the
user's home directory

Change-Id: I91911ef404126618b1ddd3589294824a0ad919e6
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoConfig: extract method to read included config 47/111847/5
Marc Strapetz [Mon, 20 Nov 2017 09:21:30 +0000 (10:21 +0100)]
Config: extract method to read included config

Change-Id: I2c55af3e5fe29e0ce8e3d05e4b54ec961d3f863a
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoConfigTest: fix on Windows 46/111846/5
Marc Strapetz [Mon, 20 Nov 2017 17:21:22 +0000 (18:21 +0100)]
ConfigTest: fix on Windows

Change-Id: I37a2ef611aef97faf1b891a9660c1745435a915d
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' 84/112784/2
David Pursehouse [Sun, 3 Dec 2017 23:19:46 +0000 (08:19 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  Prepare 4.9.2-SNAPSHOT builds
  JGit v4.9.1.201712030800-r
  Silence API warnings for reintroduced ResolveMerger#processEntry

Change-Id: I8a703815a9b3d8b7e06e308cc46a8c458731c013

6 years agoPrepare 4.9.2-SNAPSHOT builds 72/112772/1
Matthias Sohn [Sun, 3 Dec 2017 13:17:43 +0000 (14:17 +0100)]
Prepare 4.9.2-SNAPSHOT builds

Change-Id: I5879ad4aee94ff6783b5589728912117f2495dd3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.9.1.201712030800-r 71/112771/1 v4.9.1.201712030800-r
Matthias Sohn [Sun, 3 Dec 2017 12:59:36 +0000 (13:59 +0100)]
JGit v4.9.1.201712030800-r

Change-Id: I8bf477778c9dac41cb65233a9e7d590531a836b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoSilence API warnings for reintroduced ResolveMerger#processEntry 70/112770/1
Matthias Sohn [Sun, 3 Dec 2017 12:54:28 +0000 (13:54 +0100)]
Silence API warnings for reintroduced ResolveMerger#processEntry

This was silenced before but suppression was unintentionally lost in
merge commit 6858339c1e2878d5c5dc6cc9b422f9802be950ae.
This method was removed in 4.9.0 and reintroduced in 4.9.1 to avoid
breaking EMF compare versions which were built against older versions.

See: abf420302bb03b119c19ddf29ef0c968f77c318d
Change-Id: I152d58ac885e044bcab682b9423f6cc83b667989
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMake local assert methods private in test classes 83/112683/1
David Pursehouse [Fri, 1 Dec 2017 01:56:18 +0000 (10:56 +0900)]
Make local assert methods private in test classes

Change-Id: I1bed28a1eac3c7f84cc40841853b9540c72be265
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpgrade error_prone_core to 2.1.3 82/112682/1
David Pursehouse [Fri, 1 Dec 2017 01:27:34 +0000 (10:27 +0900)]
Upgrade error_prone_core to 2.1.3

Change-Id: I45619f8089a3cd1390e57158c4bf808c84330a50
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge branch 'stable-4.9' 29/112629/3
Matthias Sohn [Thu, 30 Nov 2017 12:37:30 +0000 (13:37 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  GC: Delete stale temporary packs and indexes

Change-Id: I49b37845ee8a465404b801a2d8de0205a2e7ba30
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpdate Jetty to 9.4.8.v20171121 96/112596/1
Matthias Sohn [Wed, 29 Nov 2017 22:09:17 +0000 (23:09 +0100)]
Update Jetty to 9.4.8.v20171121

Change-Id: I4ea421758e3469a59fa4fbbf46ce86757dd267e9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "Break down DfsBlockCache stats by pack file extension."
Shawn Pearce [Tue, 28 Nov 2017 20:37:30 +0000 (15:37 -0500)]
Merge "Break down DfsBlockCache stats by pack file extension."

6 years agoRepoCommand: Skip RemoteReader when encountering a full SHA-1 67/112467/1
Jonathan Nieder [Tue, 28 Nov 2017 16:16:56 +0000 (08:16 -0800)]
RepoCommand: Skip RemoteReader when encountering a full SHA-1

There is no point in calling back to the RemoteReader to resolve a
40-digit hex SHA-1 to itself.  We already skip that call when not
ignoring remote failures; skip it when ignoring remote failures, too.

This should simplify RemoteReader implementations.

Reported-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I7566968ed1f39b1ad73574fa903faf3ee308eb87

6 years agoBreak down DfsBlockCache stats by pack file extension. 91/112391/2
Minh Thai [Mon, 27 Nov 2017 22:28:11 +0000 (14:28 -0800)]
Break down DfsBlockCache stats by pack file extension.

Change-Id: Iaecf0580279b33e3e2439784528cae7b69fb28bc
Signed-off-by: Minh Thai <mthai@google.com>
6 years agoUpgrade spotbugs-maven-plugin to 3.1.0-RC8 30/112230/2
David Pursehouse [Fri, 24 Nov 2017 01:12:36 +0000 (10:12 +0900)]
Upgrade spotbugs-maven-plugin to 3.1.0-RC8

Change-Id: I650d1a527063204aa9696fe99b4f59bfa7e5fb97
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGC: Delete stale temporary packs and indexes 18/111018/4
Hector Caballero [Fri, 3 Nov 2017 18:39:37 +0000 (14:39 -0400)]
GC: Delete stale temporary packs and indexes

When a GC operation is interrupted, temporary packs and indexes can be
left on the pack folder. In big, busy repositories this can lead to
significant amounts of wasted disk space if this interruption is done
with a certain frequency.

Remove stale temporary packs and indexes at the end of the GC process so
they do not accumulate. To avoid interfering with a possible concurrent
JGit GC process in the same repository, only delete temporary files that
are older than one day.

Change-Id: If9b6c1e57fac8a6a0ecc0a703089634caba4caae
Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
6 years agoPerformance improvement on writing a large index 67/112067/4
Stephen Lawson [Wed, 22 Nov 2017 12:41:05 +0000 (12:41 +0000)]
Performance improvement on writing a large index

The index header consists of a 4-byte version number. The current
supported version numbers are 2 and 3. The code checks if any entries
are extended. If it finds any entries that are extended it picks version
'3', otherwise it chooses version '2'.

DirCache.java
-Changed the 'extended' check to exit early when any entry is considered
'extended' in the index.

(Of course, I maybe missing a bitwise optimization that is made in
the Java bytecode.)

Change-Id: If70db9454befe683319b974ebd3774060be9445d
Signed-off-by: Stephen Lawson <slawson@ptc.com>
6 years agoUpgrade maven-compiler-plugin to 3.7.0 40/112040/2
David Pursehouse [Wed, 22 Nov 2017 07:55:11 +0000 (16:55 +0900)]
Upgrade maven-compiler-plugin to 3.7.0

Change-Id: I9c4a591b809cee702b2d064d74c9809c023c78c8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFix discouraged access warnings in RefsUnreadableInMemoryRepository 28/112228/1
Matthias Sohn [Fri, 24 Nov 2017 00:23:07 +0000 (01:23 +0100)]
Fix discouraged access warnings in RefsUnreadableInMemoryRepository

Change-Id: I16e291f533625c80b1d39f7cbaf40efbdfcc2c3c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.9' 27/112227/1
Matthias Sohn [Fri, 24 Nov 2017 00:18:13 +0000 (01:18 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  Ignore warning for minor version change without API change
  Silence boxing warning
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de

6 years agoIgnore warning for minor version change without API change 26/112226/1
Matthias Sohn [Fri, 24 Nov 2017 00:12:14 +0000 (01:12 +0100)]
Ignore warning for minor version change without API change

- this is a new warning option in Eclipse 4.7 and higher
- we always change version of all bundles in a release to keep release
engineering simple

Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.8' into stable-4.9 29/112129/2
Matthias Sohn [Wed, 22 Nov 2017 22:46:39 +0000 (23:46 +0100)]
Merge branch 'stable-4.8' into stable-4.9

* stable-4.8:
  Silence boxing warning
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: I7cf2e48934195430b3945b6d74b092f93a3ccd36
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.7' into stable-4.8 28/112128/2
Matthias Sohn [Wed, 22 Nov 2017 22:25:49 +0000 (23:25 +0100)]
Merge branch 'stable-4.7' into stable-4.8

* stable-4.7:
  Silence boxing warning
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: Iaa99ec84594baf733c993c2d6768281ff14f545a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.6' into stable-4.7 26/112126/1
Matthias Sohn [Wed, 22 Nov 2017 22:06:50 +0000 (23:06 +0100)]
Merge branch 'stable-4.6' into stable-4.7

* stable-4.6:
  Silence boxing warning
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: I8f6bc09540727c6273d22775a9f9ca382a729c9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoSilence boxing warning 17/112117/1
Matthias Sohn [Wed, 22 Nov 2017 20:34:37 +0000 (21:34 +0100)]
Silence boxing warning

Change-Id: I36c40eb91ce0c51f89b47911fa14beffcbc0a7cd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.5' into stable-4.6 16/112116/1
Matthias Sohn [Wed, 22 Nov 2017 20:34:08 +0000 (21:34 +0100)]
Merge branch 'stable-4.5' into stable-4.6

* stable-4.5:
  Prepare 4.5.5-SNAPSHOT builds
  JGit v4.5.4.201711221230-r
  Fix LockFile semantics when running on NFS
  Honor trustFolderStats also when reading packed-refs
  Prepare 4.5.4-SNAPSHOT builds
  JGit v4.5.3.201708160445-r

Change-Id: Ie9c8e0d9172c8d53f075c284bf2a9677980d8dfb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 4.5.5-SNAPSHOT builds 06/112106/1
Matthias Sohn [Wed, 22 Nov 2017 18:27:22 +0000 (19:27 +0100)]
Prepare 4.5.5-SNAPSHOT builds

Change-Id: I71f946f2875716670a2d74c21a8ab38a1f53a25c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.5.4.201711221230-r 96/112096/1 v4.5.4.201711221230-r
Matthias Sohn [Wed, 22 Nov 2017 17:31:24 +0000 (18:31 +0100)]
JGit v4.5.4.201711221230-r

Change-Id: Ia1079da239c5b3fde1ba8d2acc4e465a46297b4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix LockFile semantics when running on NFS 16/112016/9
Christian Halstrick [Tue, 14 Nov 2017 16:08:56 +0000 (17:08 +0100)]
Fix LockFile semantics when running on NFS

When running on NFS there was a chance that JGits LockFile
semantic is broken because File#createNewFile() may allow
multiple clients to create the same file in parallel. This
change provides a fix which is only used when the new config
option core.supportsAtomicCreateNewFile is set to false. The
default for this option is true. This option can only be set in the
global or the system config file. The repository config file is not
taken into account in this case.

If the config option core.supportsAtomicCreateNewFile is true
then File#createNewFile() is trusted and the behaviour doesn't
change.

But if core.supportsAtomicCreateNewFile is set to false then after
successful creation of the lock file a hardlink to that lock file is
created and the attribute nlink of the lock file is checked to be 2. If
multiple clients manage to create the same lock file nlink would be
greater than 2 showing the error.

This expensive workaround is described in
 https://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
section III.d) "Exclusive File Creation"

Change-Id: I3d2cc48d8eb280d5f7039eb94da37804f903be6a

6 years agoMerge branch 'stable-4.9' 29/112029/1
David Pursehouse [Wed, 22 Nov 2017 02:31:20 +0000 (11:31 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  Yet another work-around for a Jsch bug: timeouts

Change-Id: I7cf227c62a3c06f91cee1a6c61719b6fe50da883
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoHonor trustFolderStats also when reading packed-refs 15/112015/1
Christian Halstrick [Tue, 14 Nov 2017 16:20:02 +0000 (17:20 +0100)]
Honor trustFolderStats also when reading packed-refs

Then list of packed refs was cached in RefDirectory based on mtime of
the packed-refs file. This may fail on NFS when attributes are cached.
A cached mtime of the packed-refs file could cause JGit to trust the
cached content of this file and to overlook that the file is modified.

Honor the config option trustFolderStats and always read the packed-refs
content if the option is false. By default this option is set to true
and this fix is not active.

Change-Id: I2b65cfaa8f4aba2efbf8a5e865d3f09f927e2eec

6 years agoYet another work-around for a Jsch bug: timeouts 21/111421/2
Thomas Wolf [Sat, 11 Nov 2017 10:41:10 +0000 (11:41 +0100)]
Yet another work-around for a Jsch bug: timeouts

Jsch 0.1.54 passes on the values from ~/.ssh/config for
"ServerAliveInterval" and "ConnectTimeout" as read from
the config file to java.net.Socket.setSoTimeout(). That
method expects milliseconds, but the values in the config
file are seconds!

The missing conversion in Jsch means that the timeout is
set way too low, and if the server doesn't respond within
that very short time frame, Jsch kills the connection and
then throws an exception with a message such as "session is
down" or "timeout in waiting for rekeying process".

As a work-around, do the conversion to milliseconds in the
Jsch-facing Config interface of OpenSshConfig. That way Jsch
already gets these values as milliseconds.

Bug: 526867
Change-Id: Ibc9b93f7722fffe10f3e770dfe7fdabfb3b97e74
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoConfig: Handle leading/trailing single whitespaces 20/111920/1
Dave Borowitz [Mon, 20 Nov 2017 18:55:25 +0000 (13:55 -0500)]
Config: Handle leading/trailing single whitespaces

Change-Id: I468106acd2006d0a174c76dfd4bce231f1c7a6f8

6 years agoMerge branch 'stable-4.9' 72/111872/2
David Pursehouse [Mon, 20 Nov 2017 06:38:43 +0000 (15:38 +0900)]
Merge branch 'stable-4.9'

* stable-4.9:
  Fix NPE in TransportGitSsh.ExtSession.exec()
  Add missing help text for rev-parse's --verify option
  Remove final modifier on args4j argument field in RevParse

Change-Id: I5ac9e2f185f2210ee76970501710b99b12e93e75
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFix NPE in TransportGitSsh.ExtSession.exec() 28/111828/3
Matthias Sohn [Fri, 17 Nov 2017 21:16:31 +0000 (22:16 +0100)]
Fix NPE in TransportGitSsh.ExtSession.exec()

Bug: 527383
Change-Id: I965860b4e0e9aa1adf6a1bb0735940cbd22adced
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoAdd missing help text for rev-parse's --verify option 54/111854/1
Matthias Sohn [Sat, 18 Nov 2017 23:38:05 +0000 (00:38 +0100)]
Add missing help text for rev-parse's --verify option

Change-Id: I3345f52e0c2a555e4c5edb7effe4be4af4cca10a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove final modifier on args4j argument field in RevParse 53/111853/1
Rüdiger Herrmann [Sat, 18 Nov 2017 19:23:57 +0000 (20:23 +0100)]
Remove final modifier on args4j argument field in RevParse

Args4J does no longer allow to use final fields to reference
arguments or options [1]. Change RevParse to be compatibel with this
change.

[1] https://github.com/kohsuke/args4j/commit/6e11f89d40dcc518c0e5eb9eef5d74f05d58e6af

See-also: a0558b709448cea01cc0725fff73408d9b223c72
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Change-Id: I33b233f195c06855d9e094c8c9ba804fbe7b1438

6 years agoMerge changes from topic 'includeDeletes'
Shawn Pearce [Thu, 16 Nov 2017 15:45:57 +0000 (10:45 -0500)]
Merge changes from topic 'includeDeletes'

* changes:
  Add flag for keeping ref tombstones in GC reftable
  Preserve ref tombstone when compact top retable stack

6 years agoAdd flag for keeping ref tombstones in GC reftable 62/111662/7
Minh Thai [Thu, 16 Nov 2017 06:48:04 +0000 (22:48 -0800)]
Add flag for keeping ref tombstones in GC reftable

A tombstone will prevent a delayed reference update from resurrecting the
deleted reference.

Change-Id: Id9f4df43d435a299ff16cef614821439edef9b11
Signed-off-by: Minh Thai <mthai@google.com>
6 years agoPreserve ref tombstone when compact top retable stack 85/111685/1
Minh Thai [Thu, 16 Nov 2017 06:45:32 +0000 (22:45 -0800)]
Preserve ref tombstone when compact top retable stack

Change-Id: I07f5ad572b4642a7cdd76d92aa98f3b6c63d9fa2
Signed-off-by: Minh Thai <mthai@google.com>
6 years agoRemove unused import from ReftableCompactorTest 39/111639/1
Matthias Sohn [Wed, 15 Nov 2017 15:22:55 +0000 (16:22 +0100)]
Remove unused import from ReftableCompactorTest

Change-Id: Ib6d7fb6b56a94be307b07fefacf5d9c77fce0447
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoTreeWalk: Make getEolStreamType(OperationType) public 06/111206/5
David Pursehouse [Wed, 8 Nov 2017 11:20:45 +0000 (20:20 +0900)]
TreeWalk: Make getEolStreamType(OperationType) public

and deprecate getEolStreamType().

This resolves a TODO that was apparently supposed to be done in
version 4.4.

Change-Id: I5c9861aedabdc3f99dcf47519b3959a979e6a591

6 years agoTreeWalk: Fix indentation 05/111205/4
David Pursehouse [Wed, 8 Nov 2017 11:21:28 +0000 (20:21 +0900)]
TreeWalk: Fix indentation

Change-Id: I040aaaf4e3f1e3458e0ece52d1d046f501272fc2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "ObjectDirectory: Add pack directory getter"
David Pursehouse [Wed, 15 Nov 2017 01:37:26 +0000 (20:37 -0500)]
Merge "ObjectDirectory: Add pack directory getter"

6 years agoMerge "Add return tag"
David Pursehouse [Wed, 15 Nov 2017 01:37:14 +0000 (20:37 -0500)]
Merge "Add return tag"

6 years agoMerge "ReftableCompactor should accept 0 for minUpdateIndex"
Jonathan Nieder [Tue, 14 Nov 2017 20:05:19 +0000 (15:05 -0500)]
Merge "ReftableCompactor should accept 0 for minUpdateIndex"

6 years agoReftableCompactor should accept 0 for minUpdateIndex 02/111502/5
Minh Thai [Tue, 14 Nov 2017 04:17:16 +0000 (20:17 -0800)]
ReftableCompactor should accept 0 for minUpdateIndex

Do not use 0 as the unset value for minUpdateIndex, as input reftables
may have minUpdateIndex starting at 0.

Change-Id: Ie040a6b73d4a5eba5521e51d0ee4580713c84a3e
Signed-off-by: Minh Thai <mthai@google.com>
6 years agoObjectDirectory: Add pack directory getter 74/111374/5
Hector Caballero [Sat, 4 Nov 2017 11:37:39 +0000 (07:37 -0400)]
ObjectDirectory: Add pack directory getter

So far, in order to get the pack directory it was necessary to resolve
it from the object directory. This resolution is already done when
creating the object directory, so simplify the call by just adding a
getter to the pack directory.

Change-Id: I69e783141dc6739024e8b3d5acc30843edd651a7
Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
6 years agoAdd return tag 48/111548/1
Hector Caballero [Tue, 14 Nov 2017 15:06:26 +0000 (10:06 -0500)]
Add return tag

Eclipse was complaining about the missing tag for the return type.

Change-Id: I43c7e823c3090b19dc8202c1e4d7968e1fa8e6bb
Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
6 years agoFileUtils.toPath to convert File to Path 93/110593/3
Marc Strapetz [Tue, 14 Nov 2017 09:02:07 +0000 (10:02 +0100)]
FileUtils.toPath to convert File to Path

When invoking File.toPath(), an (unchecked) InvalidPathException may be
thrown which should be converted to a checked IOException.

For now, we will replace File.toPath() by FileUtils.toPath() only for
code which can already handle IOExceptions.

Change-Id: I0f0c5fd2a11739e7a02071adae9a5550985d4df6
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
6 years agoSilence invalid @since 3.5 API warning on ResolveMerge#processEntry 95/111495/1
Matthias Sohn [Mon, 13 Nov 2017 21:41:57 +0000 (22:41 +0100)]
Silence invalid @since 3.5 API warning on ResolveMerge#processEntry

This method was removed in 4.9 and reintroduced in
I48ba4308dee73925fa32d6c2fd6b5fd89632c571 as deprecated in 4.9.1 in
order to help EMF Compare to avoid breakage.

Change-Id: Ia638517178313da42ae13ebcf88ad535d9a02723
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge changes I335587ee,I4182a174
David Pursehouse [Sat, 11 Nov 2017 03:05:50 +0000 (22:05 -0500)]
Merge changes I335587ee,I4182a174

* changes:
  Merge branch 'stable-4.9'
  Remove an unused import from PackParserTest

6 years agoAdd a setting for fsck to check connectivity only 17/111417/4
Zhen Chen [Sat, 11 Nov 2017 00:05:28 +0000 (16:05 -0800)]
Add a setting for fsck to check connectivity only

The object checks may take a long time and sometimes we are only
interested in connectivity check.

This is similar to 'git fsck --connectivity-only'.

Change-Id: I654e8fdccdb16d796f920088429d188cc96734bc
Signed-off-by: Zhen Chen <czhen@google.com>
6 years agoMerge branch 'stable-4.9' 01/111401/2
Matthias Sohn [Fri, 10 Nov 2017 18:01:14 +0000 (19:01 +0100)]
Merge branch 'stable-4.9'

* stable-4.9:
  Work around a Jsch bug: ensure the user name is set from URI
  Reintroduce protected method which removal broke EMF Compare

Change-Id: I335587eee279f91bd36c9ba9fc149b17a6db6110
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove an unused import from PackParserTest 00/111400/2
Matthias Sohn [Fri, 10 Nov 2017 18:00:55 +0000 (19:00 +0100)]
Remove an unused import from PackParserTest

Change-Id: I4182a1746b09dedab648e457d1ece6d667a01f12
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge changes I22a8874b,I68ed4abd,I740bc4bf,Icbd17d15
Jonathan Nieder [Fri, 10 Nov 2017 23:52:53 +0000 (18:52 -0500)]
Merge changes I22a8874b,I68ed4abd,I740bc4bf,Icbd17d15

* changes:
  BitmapWalker: do not revisit objects in bitmap
  Use bitmaps for non-commit reachability checks
  Make PackWriterBitmapWalker public
  UploadPackTest: construct commits in test method

6 years agoBitmapWalker: do not revisit objects in bitmap 86/111086/8
Jonathan Tan [Thu, 2 Nov 2017 01:20:54 +0000 (18:20 -0700)]
BitmapWalker: do not revisit objects in bitmap

Currently, BitmapWalker walks through every object returned by the
internal ObjectWalk, regardless of whether that object has already
been marked in the bitmap. Set an object filter to ensure that only
bitmap-unmarked objects are walked through.

Change-Id: I22a8874b1e571df3c33643b365036d95f52fe7c7
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
6 years agoUse bitmaps for non-commit reachability checks 85/111085/8
Jonathan Tan [Thu, 2 Nov 2017 00:36:18 +0000 (17:36 -0700)]
Use bitmaps for non-commit reachability checks

Currently, unless RequestPolicy#ANY is used, UploadPack rejects all
non-commit "want" lines unless they were advertized. This is fine,
except when "uploadpack.allowreachablesha1inwant" is true
(corresponding to RequestPolicy#REACHABLE_COMMIT), in which case one
would expect that "want"-ing anything reachable would work.

(There is no restriction that "want" lines must only contain commits -
it is allowed for refs to directly point to trees and blobs, and
requesting for them using "want" lines works.)

This commit has been written to avoid performance regressions as much
as possible. In the usual (and currently working) case where the only
unadvertized things requested are commits, we do a standard RevWalk in
order to avoid incurring the cost of loading bitmaps. However, if
unadvertized non-commits are requested, bitmaps are used instead, and
if there are no bitmaps, a WantNotValidException is thrown (as is
currently done).

Change-Id: I68ed4abd0e477ff415c696c7544ccaa234df7f99
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
6 years agoMake PackWriterBitmapWalker public 84/111084/7
Jonathan Tan [Wed, 25 Oct 2017 21:09:17 +0000 (14:09 -0700)]
Make PackWriterBitmapWalker public

Make PackWriterBitmapWriter class public and move it to a more central
location, in preparation for its use by another class (in a subsequent
commit).

One of its inner static classes, AddUnseenToBitmapFilter, previously
package-private, is also used directly in its former package. Therefore,
AddUnseenToBitmapFilter and its sibling class have been moved to an
internal package instead.

Change-Id: I740bc4bfc4e4e3c857d1ee7d25fe45e90cd22a75
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
6 years agoWork around a Jsch bug: ensure the user name is set from URI 59/111359/1
Thomas Wolf [Tue, 7 Nov 2017 07:19:56 +0000 (08:19 +0100)]
Work around a Jsch bug: ensure the user name is set from URI

JSch unconditionally overrides the user name given in the connection
URI by the one found in ~/.ssh/config (if that does specify one for
the used host). If the SSH config file has a different user name,
we'll end up using the wrong name, which typically results in an
authentication failure or in Eclipse/EGit asking for a password for
the wrong user.

Unfortunately there is no way to prevent or circumvent this Jsch
behavior up front; it occurs already in the Session constructor at
com.jcraft.jsch.Session() and the Session.applyConfig() method. And
while there is a Session.setUserName() that would enable us to correct
this, that latter method has package visibility only.

So resort to reflection to invoke that setUserName() method to ensure
that Jsch uses the user name from the URI, if there is one.

Bug: 526778
Change-Id: Ia327099b5210a037380b2750a7fd76ff25c41a5a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoReject pack if delta exceeds array size limit 12/111312/3
Shawn Pearce [Thu, 9 Nov 2017 17:12:59 +0000 (09:12 -0800)]
Reject pack if delta exceeds array size limit

JGit's delta handling code requires the target to be a single byte
array. Any attempt to inflate a delta larger than fits in the 2GiB
limit will fail with some form of array index exceptions. Check for
this overflow early and abort pack parsing.

Change-Id: I5bb3a71f1e4f4e0e89b8a177c7019a74ee6194da

6 years agoCheck non-flushed packs for existence of object 76/111176/4
Zhen Chen [Tue, 7 Nov 2017 20:48:47 +0000 (12:48 -0800)]
Check non-flushed packs for existence of object

Change-Id: Id466909d70ec6f828c904692139891dec880305e
Signed-off-by: Zhen Chen <czhen@google.com>
6 years agoSuppress "Unlikely argument type for equals()" warnings in tests 61/106061/4
David Pursehouse [Sun, 1 Oct 2017 05:08:17 +0000 (06:08 +0100)]
Suppress "Unlikely argument type for equals()" warnings in tests

This new warning was introduced in Eclipse 4.7 Oxygen [1].

The only instances of the warning are in test code that is asserting
that some class does not compare equal to Strings. As in the Gerrit
project [2] these asserts are arguably overkill, but arguably also
a reasonable test of an equals implementation. Ignore the warning in
these cases.

Note that if the project is opened in an earlier version of Eclipse,
a warning "Unsupported @SuppressWarnings" will be emitted.

[1] https://www.eclipse.org/eclipse/news/4.7/M6/
[2] https://gerrit-review.googlesource.com/#/c/gerrit/+/110339/

Change-Id: I08ea33d71e6009cf0f37e6492a475931f447256b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUpdate spotbugs-maven-plugin to 3.1.0-RC7 48/110948/2
Matthias Sohn [Thu, 2 Nov 2017 21:48:00 +0000 (22:48 +0100)]
Update spotbugs-maven-plugin to 3.1.0-RC7

Change-Id: Ic1c2c5b6e3955a1404780e51206513d226600e4b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "Reintroduce protected method which removal broke EMF Compare" into stable-4.9
Matthias Sohn [Thu, 2 Nov 2017 16:59:11 +0000 (12:59 -0400)]
Merge "Reintroduce protected method which removal broke EMF Compare" into stable-4.9