Commit Graph

5543 Commits

Author SHA1 Message Date
Matthias Sohn df2bcbfb23 Fix javadoc in org.eclipse.jgit attributes package
Change-Id: I12968f4be805266f285a518a014b8bd1d0c23bae
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:23:24 -05:00
David Pursehouse 663cb669b1 PushConnectionTest: Increase maxCommandBytes yet again
It was already increased in 61a943e and 661232b but is still not
enough to take into account snapshot versions that are 100 or more
commits ahead of tag, i.e. 4.9.2.201712150930-r.105-gc1d37ca27

Change-Id: Ibeff73adae06b92fe5bb9c5eced9e4c6a08c437c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-18 10:22:33 +09:00
David Pursehouse 098893617d Repeat: Fix javadoc to say 'annotation' instead of 'interface'
Change-Id: Ib0c4ec28d6b7e2fc0fe71f7dc53dd12ccd6e8a2f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-18 10:21:37 +09:00
David Pursehouse e895d21a52 Remove redundant @SuppressWarnings("unused")
These are now redundant since the parameters have javadoc.

Change-Id: I6bfde267e1712ee35871c30c8203c3b4dc5e136a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-18 10:19:53 +09:00
David Pursehouse 40608e6e26 PathTreeFilterHandler: Remove unused import
Change-Id: I7a91210dcb775d0c9b46772f8ff3d84196ba3b10
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-18 10:17:37 +09:00
Matthias Sohn 6ac27ee215 Fix javadoc in org.eclipse.jgit.ui
Change-Id: Iec68c73fc0d8d26fdb26850354059ea521ac7fe5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-18 01:08:06 +01:00
Matthias Sohn f677ee4893 Fix javadoc in org.eclipse.jgit.pgm
Change-Id: I74616f6e8ef69bef4db2f13a9b47ddf57714fd1f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-18 01:08:02 +01:00
Matthias Sohn 5d64d3d83a Fix javadoc in org.eclipse.jgit.lfs.server
Change-Id: I0c52536ebeeb8e71d95c6420f6db7055ff082dfa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:59:24 +01:00
Matthias Sohn e0332bfbc6 Fix javadoc in org.eclipse.jgit.lfs
Change-Id: I97b53c083da6aa31719d9e10369030ee33dd23dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:59:24 +01:00
Matthias Sohn a90b75b47a Fix javadoc in org.eclipse.jgit.junit
Change-Id: I1107e6a82849ac329361baabb5c481d86ea6dc9e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:21:54 +01:00
Matthias Sohn 0b131b7312 Fix javadoc in org.eclipse.jgit.junit.http
Change-Id: I8af6d07676a285f79635405e5891535a5adfd7e9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:55 +01:00
Matthias Sohn 60b5111e4a Fix javadoc in org.eclipse.jgit.http.test
Change-Id: Ibd18dfed05d35bd70498d11c04c026a34114a87e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:55 +01:00
Matthias Sohn 3b00041caf Fix javadoc in org.eclipse.jgit.http.server
Change-Id: I732d773b21bbf64285493070964dd9e442eab5d8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:55 +01:00
Matthias Sohn 53891d4eda Fix javadoc in org.eclipse.jgit.http.apache
Change-Id: I38a4854856b0103790a410b48c1c3d708b6500c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:55 +01:00
Matthias Sohn 32022e9764 Fix javadoc in org.eclipse.jgit.archive
Change-Id: Ibef80b15f17e884f3085e324283cefc738236a4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:55 +01:00
Matthias Sohn c7093f5cbe Fix javadoc in org.eclipse.jgit.ant
Change-Id: I97231080ebe040ad44f7189de6109b9626424d2f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-17 20:05:44 +01:00
David Pursehouse c1d37ca275 Upgrade maven-javadoc-plugin to 3.0.0
This version seems to be much stricter and reports a lot more errors
in the javadoc formatting.

Disable failOnError to prevent the build from failing due to these
newly reported problems. These should be fixed in a follow-up commit.

Change-Id: Ia403cbedf72cfe8bdaf09f30e42e3bf96084ae52
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-16 14:30:05 +01:00
David Pursehouse 0e6728b0ad Upgrade maven-surefire{-report}-plugin to 2.20.1
Change-Id: If3979b36ac0e1fd66f31f8a92e76b0e47d066a3b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-16 14:30:04 +01:00
David Pursehouse 73d1c9b4e1 Upgrade maven-dependency-plugin to 3.0.2
Change-Id: I1ed9f0e0ebdcadc4ddc56a78894b3a4220ae26ac
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-16 14:30:03 +01:00
David Pursehouse 00e2c5a60c Upgrade maven-shade-plugin to 3.1.0
Change-Id: I14d746dfbfcea0d87378894b74c0cd673253f566
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-16 14:30:03 +01:00
David Pursehouse ed38840eba Merge branch 'stable-4.9'
* stable-4.9:
  Prepare 4.9.3-SNAPSHOT builds
  JGit v4.9.2.201712150930-r
  Write packed-refs directly when cloning

Change-Id: I3b0fad9c45cdf3a918ddb8ea4a37b8d3403aae90
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-16 14:04:01 +01:00
Matthias Sohn 1e56842742 Prepare 4.9.3-SNAPSHOT builds
Change-Id: Ife3f2b0b5407227f89ded42358adbf01d53e14cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-16 03:49:03 +01:00
Zhen Chen 99e70530b9 DfsFsck: Skip unborn branches and symrefs to nowhere
The map returned by getAllRefs includes all refs, including symrefs like
HEAD that may not point to any object yet. That is a valid state (e.g.,
in a new repository that has just been created by "git init"), so skip
such refs.

Change-Id: Ieff8a1aa738b8d09a2990d075eb20601156b70d3
Signed-off-by: Zhen Chen <czhen@google.com>
2017-12-15 14:16:33 -08:00
Matthias Sohn 24b7e91264 JGit v4.9.2.201712150930-r
Change-Id: I013964045d532659a4be3b81d6612b59bc9ffb14
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-15 15:29:36 +01:00
Thomas Wolf c86327979f Write packed-refs directly when cloning
When we are cloning we have no refs at all yet, and there cannot
(or at least should not) be any other thread doing something with
refs yet.

Locking loose refs is thus not needed, since there are no loose
refs yet and nothing should be trying to create them concurrently.

Let's skip the whole loose ref locking when we are cloning a repository.
As a result, JGit will write the refs directly to the packed-refs
file, and will not create the refs/remotes/ directories nor the
lock files underneath when cloning and packed refs are used. Since
no lock files are created, any problems on case-insensitive file
systems with tag or branch names that differ only in case are avoided
during cloning.

Detect if we are cloning based on the following heuristics:
* HEAD is a dangling symref
* There is no loose ref
* There is no packed-refs file

Note, however, that there may still be problems with such tag or
branch names later on. This is primarily a five-minutes-past-twelve
stop-gap measure to resolve the referenced bug, which affects the
Oxygen.2 release.

Bug: 528497
Change-Id: I57860c29c210568165276a123b855e462b6a107a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-15 14:14:03 +01:00
David Pursehouse c60814d1d5 ConfigTest: Remove redundant assignment
Change-Id: Ia913dbe6b7ad4b7000525fda8ca08cbc8dd87da6
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-15 09:33:50 +09:00
David Pursehouse 778d62e596 Merge branch 'stable-4.9'
* stable-4.9:
  Config: Remove the include functionality

Merged with "-s ours" because the fix on stable conflicts with
the fix already done here.

Change-Id: I85e394422d5dc40ca33ed3a78ddbf5cd1da1664a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-15 09:21:57 +09:00
David Pursehouse ec7f88eec8 Config: Remove the include functionality
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.

This was fixed on master [1] by making "readIncludedConfig" a noop
by default. This allows only FileBasedConfig, which originated from
local disk, to read local system paths.

However, the "readIncludedConfig" method was only introduced in [2]
which was needed by [3], both of which are only on the master branch.
On the stable branch only Config supports includes. Therefore this
commit simply disables the include functionality.

[1] https://git.eclipse.org/r/#/c/113371/
[2] https://git.eclipse.org/r/#/c/111847/
[3] https://git.eclipse.org/r/#/c/111848/

Bug: 528781
Change-Id: I9a3be3f1d07c4b6772bff535a2556e699a61381c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-15 08:58:00 +09:00
David Pursehouse 5fa129555a Merge branch 'stable-4.9'
* stable-4.9:
  InMemoryRepository: Make inner class MemObjDatabase static

Change-Id: I62bb5957de1ae3bc6030ea2181b09efccc48252b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-14 11:05:05 +09:00
Shawn Pearce 3a7704638a 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
2017-12-13 17:50:52 -08:00
Shawn Pearce f635aa51f8 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
2017-12-13 17:10:51 -08:00
David Pursehouse c09ed93e85 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>
2017-12-13 09:51:57 +09:00
Matthias Sohn c9b4903ae3 Updpate oxygen orbit to R20170919201930 and remove old orbit repos
Change-Id: I2bf09cc3b08ebc762390e2892b966b11027e2e89
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-13 01:08:24 +01:00
Matthias Sohn e3b3c0431e Remove use of deprecated X509HostnameVerifier
Change-Id: I318f5457ade3d11b2ac1c99f6ef382a0a147a352
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-13 01:08:23 +01:00
Matthias Sohn e1fb47bd55 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>
2017-12-13 01:08:23 +01:00
David Pursehouse 2edf66bdd7 Remove unused API filters
Change-Id: Ie8bfa4e8473c2a68a6308de7dbf29ccbca97495d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-13 01:03:55 +01:00
David Pursehouse c40e150790 InMemoryRepository: Make inner class MemObjDatabase 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: I9f49de32b4cd81b7ef1239b390353689263bf66e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-12-12 00:39:21 -05:00
David Turner 623851ec16 TransportCommand#setTimeout: Specify units for timeout in Javadoc
Change-Id: Iadf0e2c6483794e43a5326f6be6bb34c19b00564
Signed-off-by: David Turner <dturner@twosigma.com>
2017-12-12 13:25:05 +09:00
Matthias Sohn 9d79dc95e2 Fix typo in key of a JGitText externalized string
Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-11 09:35:15 +09:00
Matthias Sohn b46656077a Fix typo in key of a JGitText externalized string
Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-12-10 18:33:23 +01:00
Matthias Sohn 032750acbf Merge branch 'stable-4.9'
* stable-4.9:
  Fix IllegalThreadStateException if stderr closed without exiting

Change-Id: I8a6a6788c2bb000171233b88d9592ed0640ad15e
2017-12-10 18:10:34 +01:00
Dmitry Pavlenko 7ccf38adc6 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>
2017-12-10 18:00:55 +01:00
Thomas Wolf cde32497b5 Merge "URIishTest: more Windows file-protocol tests" 2017-12-09 16:27:18 -05:00
Marc Strapetz 93462447b4 URIishTest: more Windows file-protocol tests
Change-Id: Id5fbd8bb9cd05da89d27e9532612d64ae84a55ba
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
2017-12-09 12:15:12 +01:00
David Pursehouse c861c0e2ee 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>
2017-12-08 17:21:52 +09:00
David Pursehouse 0e5b9f8a39 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>
2017-12-08 17:16:34 +09:00
David Pursehouse fdacfaecc4 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>
2017-12-08 17:00:56 +09:00
David Pursehouse 2c11f23384 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>
2017-12-08 16:57:57 +09:00
David Pursehouse deb68cfb4a 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>
2017-12-08 07:43:19 +09:00
David Pursehouse 53a11cb1d1 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>
2017-12-08 07:42:33 +09:00