summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix javadoc in org.eclipse.jgit.archiveMatthias Sohn2017-12-178-40/+45
| | | | | Change-Id: Ibef80b15f17e884f3085e324283cefc738236a4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit.antMatthias Sohn2017-12-174-1/+22
| | | | | Change-Id: I97231080ebe040ad44f7189de6109b9626424d2f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Upgrade maven-javadoc-plugin to 3.0.0David Pursehouse2017-12-161-1/+3
| | | | | | | | | | | 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>
* Upgrade maven-surefire{-report}-plugin to 2.20.1David Pursehouse2017-12-161-2/+2
| | | | | Change-Id: If3979b36ac0e1fd66f31f8a92e76b0e47d066a3b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Upgrade maven-dependency-plugin to 3.0.2David Pursehouse2017-12-161-1/+1
| | | | | Change-Id: I1ed9f0e0ebdcadc4ddc56a78894b3a4220ae26ac Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Upgrade maven-shade-plugin to 3.1.0David Pursehouse2017-12-161-1/+1
| | | | | Change-Id: I14d746dfbfcea0d87378894b74c0cd673253f566 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-4.9'David Pursehouse2017-12-162-5/+37
|\ | | | | | | | | | | | | | | | | | | * 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>
| * Prepare 4.9.3-SNAPSHOT buildsMatthias Sohn2017-12-1656-333/+333
| | | | | | | | | | Change-Id: Ife3f2b0b5407227f89ded42358adbf01d53e14cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v4.9.2.201712150930-rv4.9.2.201712150930-rMatthias Sohn2017-12-1556-59/+59
| | | | | | | | | | Change-Id: I013964045d532659a4be3b81d6612b59bc9ffb14 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Write packed-refs directly when cloningThomas Wolf2017-12-152-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | DfsFsck: Skip unborn branches and symrefs to nowhereZhen Chen2017-12-151-2/+8
| | | | | | | | | | | | | | | | | | | | 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>
* | ConfigTest: Remove redundant assignmentDavid Pursehouse2017-12-151-2/+1
| | | | | | | | | | Change-Id: Ia913dbe6b7ad4b7000525fda8ca08cbc8dd87da6 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge branch 'stable-4.9'David Pursehouse2017-12-150-0/+0
|\| | | | | | | | | | | | | | | | | | | | | * 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>
| * Config: Remove the include functionalityDavid Pursehouse2017-12-152-55/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable-4.9'David Pursehouse2017-12-141-1/+1
|\| | | | | | | | | | | | | | | * stable-4.9: InMemoryRepository: Make inner class MemObjDatabase static Change-Id: I62bb5957de1ae3bc6030ea2181b09efccc48252b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * InMemoryRepository: Make inner class MemObjDatabase staticDavid Pursehouse2017-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make Config.readIncludedConfig a noop by defaultShawn Pearce2017-12-132-33/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | DfsBlockCache.hasBlock0: quickly check for file in cacheShawn Pearce2017-12-131-0/+17
| | | | | | | | | | | | | | | | 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
* | Merge branch 'stable-4.9'David Pursehouse2017-12-131-1/+1
|\| | | | | | | | | | | | | | | | | * 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>
| * TransportCommand#setTimeout: Specify units for timeout in JavadocDavid Turner2017-12-121-1/+1
| | | | | | | | | | Change-Id: Iadf0e2c6483794e43a5326f6be6bb34c19b00564 Signed-off-by: David Turner <dturner@twosigma.com>
| * Fix typo in key of a JGitText externalized stringMatthias Sohn2017-12-113-3/+3
| | | | | | | | Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Updpate oxygen orbit to R20170919201930 and remove old orbit reposMatthias Sohn2017-12-1310-170/+11
| | | | | | | | Change-Id: I2bf09cc3b08ebc762390e2892b966b11027e2e89 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove use of deprecated X509HostnameVerifierMatthias Sohn2017-12-131-29/+2
| | | | | | | | Change-Id: I318f5457ade3d11b2ac1c99f6ef382a0a147a352 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update Apache httpclient to 4.5.2 and httpcore to 4.4.6Matthias Sohn2017-12-139-33/+48
| | | | | | | | | | | | | | CQ: 15051 CQ: 15052 Change-Id: I532cd73253601ce1d2926850af2519aae6744a9c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove unused API filtersDavid Pursehouse2017-12-131-43/+0
| | | | | | | | | | Change-Id: Ie8bfa4e8473c2a68a6308de7dbf29ccbca97495d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Fix typo in key of a JGitText externalized stringMatthias Sohn2017-12-103-3/+3
| | | | | | | | Change-Id: I0d22e24a0aa3b17339ef68849554f7c99b350dde Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-12-103-6/+31
|\| | | | | | | | | | | | | * stable-4.9: Fix IllegalThreadStateException if stderr closed without exiting Change-Id: I8a6a6788c2bb000171233b88d9592ed0640ad15e
| * Fix IllegalThreadStateException if stderr closed without exitingDmitry Pavlenko2017-12-103-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "URIishTest: more Windows file-protocol tests"Thomas Wolf2017-12-091-0/+82
|\ \
| * | URIishTest: more Windows file-protocol testsMarc Strapetz2017-12-091-0/+82
| | | | | | | | | | | | | | | Change-Id: Id5fbd8bb9cd05da89d27e9532612d64ae84a55ba Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | | PackInserterTest: Prevent potential NPE dereferencing Path.getFileName()David Pursehouse2017-12-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | CloneCommand: Refactor listing of files in deleteChildrenDavid Pursehouse2017-12-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Specify consistent version range for junit in OSGi manifestsDavid Pursehouse2017-12-088-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'stable-4.9'David Pursehouse2017-12-080-0/+0
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | * 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>
| * LfsServerText: Fix formatting of invalidPathInfo messageDavid Pursehouse2017-12-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * InvalidLongObjectIdException: Fix formatting of messageDavid Pursehouse2017-12-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * FileLfsServlet: Do not pretty print json responseDavid Pursehouse2017-12-082-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | DfsBlockCache#creditSpace: release clockLock in finally blockDavid Pursehouse2017-12-071-2/+5
| | | | | | | | | | | | | | | | | | 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>
* | ArchiveTest: Check result of BufferedInputStream#skipDavid Pursehouse2017-12-071-1/+5
| | | | | | | | | | Change-Id: I5168c75ca2dda6d1e8c8a6c29043ac781fe9295a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FS_POSIX: Fix boxing/unboxing of BooleanDavid Pursehouse2017-12-071-12/+19
| | | | | | | | | | | | | | | | | | | | 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>
* | Use constants from StandardCharsets instead of hard-coded stringsDavid Pursehouse2017-12-0736-282/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | LfsServerText: Fix formatting of invalidPathInfo messageDavid Pursehouse2017-12-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | InvalidLongObjectIdException: Fix formatting of messageDavid Pursehouse2017-12-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Move repeated LFS Gson handling to common classDavid Pursehouse2017-12-073-46/+123
| | | | | | | | | | | | | | | | | | | | 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>
* | DownloadTest: Use ExpectedException instead of try..catch..failDavid Pursehouse2017-12-072-26/+21
| | | | | | | | | | Change-Id: I5547e64de6cea3d2200887b504245c69692f00b5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FileLfsServlet: Do not pretty print json responseDavid Pursehouse2017-12-072-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable-4.9'David Pursehouse2017-12-072-2/+2
|\| | | | | | | | | | | | | | | * stable-4.9: LfsStore: Make inner class AppServer static DirCacheCheckout#processEntry: Fix typo in javadoc Change-Id: Id8e4a3c4dc741e6e0182522e72ecb4b34ae419eb
| * LfsStore: Make inner class AppServer staticDavid Pursehouse2017-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * DirCacheCheckout#processEntry: Fix typo in javadocDavid Pursehouse2017-12-061-1/+1
| | | | | | | | | | Change-Id: Ie08a6275f4656ebb46abe8748b73b0fb52a98a35 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | TransportHttp: retry on IOException with another mechanismThomas Wolf2017-12-061-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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>