summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AutoCRLFInputStreamTest: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-051-17/+16
| | | | | Change-Id: I427ab43a82861f7bc69b104e29dc4360048aec4e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CleanCommandTest: Open Repository in try-with-resourceDavid Pursehouse2018-03-051-2/+3
| | | | | Change-Id: If87cb729432ae711a2e7cfd08d288d7fec3f6de2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+4
| | | | | Change-Id: I08e27d0ee48dabd94a4eeb608508f815a3000ec9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ArchiveTest: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-051-43/+36
| | | | | Change-Id: If11017f21027b46c7a66e52e4bc0cc73f4fbdc07 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ArchiveCommand: Create archive output stream in try-with-resourceDavid Pursehouse2018-03-051-3/+3
| | | | | Change-Id: I72f4d303945275d400723aa17212b302e051dc15 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ApplyCommand: Open FileWriter in try-with-resourceDavid Pursehouse2018-03-051-3/+3
| | | | | Change-Id: Ia473f74dc4608fc43edd57eda4f193c226e9004d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AmazonS3Client: Open Input/OutputStream in try-with-resourceDavid Pursehouse2018-03-051-15/+8
| | | | | Change-Id: I32d4031159dff9005e839d0b53940431cba12beb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AmazonS3: Open InputStream/FileInputStream in try-with-resourceDavid Pursehouse2018-03-051-8/+2
| | | | | Change-Id: I71606e14d2b3cf085b8d1343c3858e7a729a173e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AdvertiseErrorTest: Open Transport in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: I78adec7baf82d1a0eedc10e90b6d4f20008a046d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AddCommandTest: Open PrintWriter in try-with-resourceDavid Pursehouse2018-03-051-99/+100
| | | | | Change-Id: I8ef769d12239447a20b670398293dbb64b90087d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* FileBasedConfigTest: Open FileOutputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: Id4c49d4af30bcc5210d35630a8699574694060bb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* WalkRemoteObjectDatabase: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-051-16/+4
| | | | | Change-Id: Ie4f67ca8cab1031089782f202588b08cc157dd79 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* TransportSftp: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-051-7/+2
| | | | | Change-Id: Iab94cce80c11a5edeaf8f377001408cc53707c04 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ReflogReaderTest: Open FileOutputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: I09af22292cc4b615b40a820dbc054282bb0c76b8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ReflogReaderTest: Fix indentationDavid Pursehouse2018-03-051-14/+14
| | | | | Change-Id: I981dc14065ce435034d2072cff77e7efaa2c5573 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ReflogWriterTest: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: Ie111aead49d83d6acfbb89bb475ef6d3159b36c4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* TransportHttp: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-051-29/+14
| | | | | Change-Id: I2f713b79ff07f5759c189f384cd25adb9b9f5761 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* RebaseCommandTest: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-051-5/+2
| | | | | Change-Id: If8d77431edfdaec4a49a3c4ffe66a99e6d31c682 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DirCacheCGitCompatabilityTest: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-051-10/+4
| | | | | Change-Id: I0494eb475954927743174941a7d6c06d8431f57f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LockFile: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: I0784266814225428a6a0070d1653c465d268b342 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* CheckoutCommandTest: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-051-8/+2
| | | | | Change-Id: I972958373ceaf4c3ae756559ccbc341506d4e72d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* SmudgeFilter: Fix Integer boxing warningDavid Pursehouse2018-03-051-1/+2
| | | | | Change-Id: Ic00bcd25b0808a58880a4433d76b3b5a6a4ee5c7 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add ConfigConstants.CONFIG_SECTION_LFSDavid Pursehouse2018-03-056-15/+27
| | | | | | | | | | | | | | DirCacheCheckout has a warning about non-localised string "lfs". Other classes use org.eclipse.jgit.lfs.lib.Constants but that is not visible to DirCacheCheckout. Add a new constant in ConfigConstants and use that in DirCacheCheckout. Replace existing uses of org.eclipse.jgit.lfs.lib.Constants.LFS with the new constant, except where it is referring to the folder name. Change-Id: I0f21b951babff9a2e579d68c4de0c62ee4bc23d4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Return this from InstallLfsCommand.setRepository() to allow chainingMatthias Sohn2018-03-041-1/+5
| | | | Change-Id: I105f1f62f2dcdb20a196361190e9c9fe368e8613 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Upgrade spotbugs-maven-plugin to 3.1.2David Pursehouse2018-03-031-1/+1
| | | | | Change-Id: I01d8392ef8d20efd7f03590c82da017e2b53a043 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Update orbit to S20180302171354 (photon) and R20180206163158 (oxygen)Matthias Sohn2018-03-0410-26/+26
| | | | Change-Id: I5b5e59581bfa00bb16e3b8e0af6e154ad6583bb9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add|RemoveNoteComand: Reduce duplicated codeDavid Pursehouse2018-03-032-33/+7
| | | | | | | | | | The private method commitNoteMap is in both classes with the same implementation. Make it static in AddNoteCommand and reuse it from RemoveNoteCommand. Change-Id: Ia037bf9efdd94ee7b8d33b41321e9cfd6ea4a6a5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LFSPointerTest: Open ByteArrayOutputStream in try-with-resourceDavid Pursehouse2018-03-031-6/+7
| | | | | Change-Id: Ib15a838e735f8b960e0ed635d6d9b0caf97f4791 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AbbreviationTest: Open FileOutputStream in try-with-resourceDavid Pursehouse2018-03-031-1/+4
| | | | | Change-Id: Id1d48da466251f9e4186f4674afba4b5901a4388 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* TagBuilder: Open OutputStreamWriter in try-with-resourceDavid Pursehouse2018-03-031-3/+2
| | | | | Change-Id: Ic0e23039b0aec6171f192234c6b1474cd32eadff Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DaemonService: Open Repository in try-with-resourceDavid Pursehouse2018-03-031-12/+4
| | | | | Change-Id: I8deec91d91e82c7cb186cfa9507eb443dd87aad3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* RefDirectory: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-031-23/+20
| | | | | Change-Id: I9239df3e381b141b48ad7ea1b706e5b5927946cd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ObjectDirectory: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-031-8/+2
| | | | | Change-Id: I4a44954c61647af1e48eade19112697e79297f2e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Patch: Open TemporaryBuffer in try-with-resourceDavid Pursehouse2018-03-031-4/+4
| | | | | Change-Id: I90bff8d49ecc37b8c10ce909cd3ac563205b641c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable warning for resources not managed by try-with-resourceDavid Pursehouse2018-03-0317-17/+17
| | | | | Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* LFS: Enable LFS support for the CLI, better error handlingMarkus Duft2018-03-037-5/+43
| | | | | | | | | | Enable LFS support for the CLI by registering the according filters. Errors during filter creation must be propagated up the call stack, as a failure to create a filter should be treated as fatal if the filter is required. Change-Id: I3833757839bdda97cd01b6c21c1613d199e2692d Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* Cleanup stream usage WRT filtersMarkus Duft2018-03-036-33/+88
| | | | | | | | As it is right now some streams leak out of the filter construct. This change clarifies responsibilities and fixes stream leaks Change-Id: Ib9717d43a701a06a502434d64214d13a392de5ab Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LFS: support merge/rebase/cherry-pick/diff/compare with LFS filesMarkus Duft2018-03-0325-93/+848
| | | | | | | | | | | | Respect merge=lfs and diff=lfs attributes where required to replace (in memory) the content of LFS pointers with the actual blob content from the LFS storage (and vice versa when staging/merging). Does not implement general support for merge/diff attributes for any other use case apart from LFS. Change-Id: Ibad8875de1e0bee8fe3a1dffb1add93111534cae Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "LFS: Dramatically improve checkout speed with SSH authentication"Matthias Sohn2018-03-014-15/+108
|\
| * LFS: Dramatically improve checkout speed with SSH authenticationMarkus Duft2018-03-014-15/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSH Authentication is quite expensive (~120ms on localhost against Gerrit with LFS plugin). The SSH authentication typically also sends a validity time of the returned token, which allows to re-use it for a certain time, avoiding the expensive authentication on every download request. This improves checkout times by large factors depending on the LFS object amount/sizes. Also make sure that all instances of Gson used by LFS are configured in the same way. Change-Id: I422c94c37021b4322789b3829fa0185e25d683f2 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | Correctly exit fetch negotiation for stateless RPC connectionsTerry Parker2018-02-281-0/+6
|/ | | | | | | | | | | | | Commit 9530c10192cf033c021802a3b295b06864654464 (2018-02-11) "Add a minimum negotiation feature for fetch" made fetch negotiation cheaper for repos with huge numbers of references (we are seeing a 15x reduction in maximum fetch times for chromium/chromium/src on trans-Pacific links). But it inadvertently broke the handling of stateless RPC connections, so fix that here. Change-Id: I0090aa76ffecc55801ebb833ac2e0c933a4a7c54 Signed-off-by: Terry Parker <tparker@google.com>
* LFS: pre-push upload supportMarkus Duft2018-02-2715-184/+837
| | | | | | | | | | | | If JGit built in LFS support is enabled for the current repository (or user/system), any existing pre-push hook will cause an exception for the time beeing, as only a single pre-push hook is supported. Thus either native pre-push hooks OR JGit built-in LFS support may be enabled currently, but not both. Change-Id: Ie7d2b90e26e948d9cca3d05a7a19489488c75895 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* AmazonS3: Open OutputStream in try-with-resourceDavid Pursehouse2018-02-261-10/+5
| | | | | Change-Id: I0685a298a0f9fec465973cc718ae3bff373318a4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* MergeGitAttributeTest: Open FileInputStream in try-with-resourceDavid Pursehouse2018-02-261-27/+17
| | | | | Change-Id: Iec85eea044c46a199b5b6f6bdbb3191d817dd441 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PullCommandWithRebaseTest: Open File{Input|Output}Stream in try-with-resourceDavid Pursehouse2018-02-261-13/+2
| | | | | Change-Id: I1ff707ab7bab676603907f4c0bb1bc495503055b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* RecursiveMergerTest: Open FileOutputStream in try-with-resourceDavid Pursehouse2018-02-261-33/+28
| | | | | Change-Id: I158333d6393fb807bc21fba23fec7ad474384471 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* PullCommandTest: Use try-with-resources for File{Input,Output}StreamDavid Pursehouse2018-02-261-13/+2
| | | | | Change-Id: I09242eb289655c7554aefa9e0817d9b881db656b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add ObjectIdSerializerDavid Pursehouse2018-02-252-0/+195
| | | | | | | | | | | | | | | This is based on the ObjectIdSerialization class written by Shawn Pearce for the Gerrit Code Review project in 2009 [1]. As mentioned in the commit message there, it should be part of core JGit. This implementation is slightly different to Shawn's version. Rather than having separate methods for null/non-null ids, single methods are implemented with @Nullable annotations. [1] https://gerrit-review.googlesource.com/c/gerrit/+/9792 Change-Id: I7599cf8bd1ecd546e2252783d6d672eb76804060 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* CheckoutCommandTest: Fix name of created temp fileDavid Pursehouse2018-02-251-1/+1
| | | | | Change-Id: I29048f83aee3848679bbc6ded09dd3dd4a2ea35b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* IgnoreNodeTest: Suppress deprecation warnings in testEmptyIgnoreNodeDavid Pursehouse2018-02-251-0/+1
| | | | | Change-Id: I930c9408cc702af911419f2a7b3d03f652a2d4e3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>