aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated ArchiveCommand#putEntry methodMatthias Sohn2018-03-091-24/+0
| | | | | | | Use #putEntry(Closeable, ObjectId, String, FileMode, ObjectLoader)} instead. Change-Id: I2c58c07da00c6033c583eb2dc6c3a0889661f5f5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-03-083-49/+49
| | | | | Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.11.1-SNAPSHOT buildsMatthias Sohn2018-03-083-49/+49
| | | | | Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.11.0.201803080745-rv4.11.0.201803080745-rMatthias Sohn2018-03-083-4/+4
| | | | | Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove useless for(;;) loopThomas Wolf2018-03-071-19/+17
| | | | Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Fix DiffFormatter for diffs against working tree with autocrlf=trueThomas Wolf2018-03-072-3/+4
| | | | | | | | | | | | | | The WorkingTreeSource produced an ObjectLoader that returned inconsistent sizes: the file size in getSize(), but then a correctly filtered smaller stream in openStream(). This resulted either in an IOE "short read of block" or in an EOFException depending on the resulting filtered size. Fix this by ensuring that getSize() does return the size of the filtered stream. Bug: 530106 Change-Id: I7c7c85036047dc10030ed29c1d5a6c7f34f2bdff Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Merge branch 'stable-4.10'Matthias Sohn2018-03-072-9/+18
|\ | | | | | | | | | | | | | | | | * stable-4.10: Don't subclass ThreadLocal to avoid memory leak in NLS Set context classloader to null in WorkQueue Change-Id: Idacf9a15a27f8e1d73357a80ed11a02237eea49e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Don't subclass ThreadLocal to avoid memory leak in NLSMatthias Sohn2018-02-141-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | These problem usually occur when you subclass ThreadLocal (usually to implement initialValue). Those classes reference the webapp's classloader. The ThreadLocal subclass in turn is referenced by each Thread instance (that's how ThreadLocals are implemented, they have a "helper-Map" in each Thread instance, so the leak is actually not a tiny Random instance but the whole webapp's classloader with a bunch of class definitions and statically referenced parts of the webapp. Bug: 449321 Change-Id: Ie7a8b0b90e40229e2471202f2a12637b9e0b1d11 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Set context classloader to null in WorkQueueMatthias Sohn2018-02-141-0/+1
| | | | | | | | | | | | | | | | | | If threads created by the executor have a reference to the context classloader this may cause a leak. See: https://wiki.apache.org/tomcat/MemoryLeakProtection#cclThreadSpawnedByWebApp Bug: 517107 Change-Id: If79c1ebd3f9cf733fd88a5fce38fd46ff0d08d10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | LFS: Adjust some API to make integration into tools (EGit,...) easierMarkus Duft2018-03-071-0/+34
| | | | | | | | | | | | | | | | | | | | Make the install command accessible without requiring reflection. Expose the isEnabled(Repository) API to be able to check if calling the install command is required for a repository. Change-Id: I17e6eaefb6afda17fea8162cbf0cb86a20506753 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | MergeCommand: Open RevWalk in try-with-resourceDavid Pursehouse2018-03-071-6/+1
| | | | | | | | | | Change-Id: I45ce481cc198b8dc78e9c46b433504840597e982 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | JschConfigSessionFactory: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-071-7/+2
| | | | | | | | | | Change-Id: I0f8f4629c93ed747f2f604538fccc52da3974b2e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | GC: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-061-21/+12
| | | | | | | | | | Change-Id: If437e14636de7c5014ee2aa419d6518acd857792 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FileRepository: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-061-4/+1
| | | | | | | | | | Change-Id: Ief8aa4834437d76f7e636598bf9861312475e64a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FetchProcess: Open OutputStreamWriter in try-with-resourceDavid Pursehouse2018-03-061-4/+2
| | | | | | | | | | Change-Id: Ide7768882a95f9e9706e50ca0774edd428dd07c1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FS: Open TemporaryBuffer in try-with-resourceDavid Pursehouse2018-03-061-6/+3
| | | | | | | | | | Change-Id: I52e048e491e838b7f762a5b5f4d148e91049877c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | DirCacheIterator: Open InputStream in try-with-resourceDavid Pursehouse2018-03-061-4/+1
| | | | | | | | | | Change-Id: I05d2d1de9a3d39466a6880f6e8107da8681876b1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge changes from topic 'try-with-resource'David Pursehouse2018-03-063-20/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * changes: DiffCommand: Open DiffFormatter in try-with-resource DiffAlgorithms: Open Repository in try-with-resource DescribeCommandTest: Open FileWriter in try-with-resource CommitCommand: Open InputStream in try-with-resource DefaultNoteMerger: Open UnionInputStream in try-with-resource
| * | DiffCommand: Open DiffFormatter in try-with-resourceDavid Pursehouse2018-03-061-10/+9
| | | | | | | | | | | | | | | Change-Id: I22bd1062d64b01bb98cdaf612482538114624b7f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | CommitCommand: Open InputStream in try-with-resourceDavid Pursehouse2018-03-061-5/+2
| | | | | | | | | | | | | | | Change-Id: I800a2afae17f84636cae593be7f07628fb8476c1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | DefaultNoteMerger: Open UnionInputStream in try-with-resourceDavid Pursehouse2018-03-061-5/+2
| | | | | | | | | | | | | | | Change-Id: I035aa89cdbf235992f41e752f49d735be4e5df0a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Silence API error raised for new CONFIG_SECTION_LFS constantMatthias Sohn2018-03-061-0/+6
|/ / | | | | | | Change-Id: I27e68d245c6b9c972ab9470c14d1f45d15d4c253 Signed-off-by: Matthias Sohn <matthias.sohn@sap.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>
* | 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>
* | 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>
* | 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>
* | LockFile: Open FileInputStream in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | | | | | | Change-Id: I0784266814225428a6a0070d1653c465d268b342 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Add ConfigConstants.CONFIG_SECTION_LFSDavid Pursehouse2018-03-052-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | 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-031-1/+1
| | | | | | | | | | Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | LFS: Enable LFS support for the CLI, better error handlingMarkus Duft2018-03-031-3/+12
| | | | | | | | | | | | | | | | | | | | 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-034-3/+43
| | | | | | | | | | | | | | | | 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-0312-62/+421
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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-275-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add ObjectIdSerializerDavid Pursehouse2018-02-251-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix warnings about boxing/unboxing BooleanDavid Pursehouse2018-02-252-4/+6
| | | | | | | | | | Change-Id: I9d81d510282e9181267750fe3f9c571c35b61407 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | WorkingTreeIterator: Fix warnings about variable hidingDavid Pursehouse2018-02-251-4/+4
| | | | | | | | | | Change-Id: I78ed3ae7aa30a7e7f146d0bd2e9feff74554da78 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | WorkingTreeIterator: Add NON-NLS suppressionsDavid Pursehouse2018-02-251-3/+3
| | | | | | | | | | Change-Id: I369b8f68912134fc3880c162e9a2c5a1669bb4ac Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Fix processing of gitignore negationsMarc Strapetz2018-02-232-63/+143
| | | | | | | | | | | | | | | | | | | | Processing of negated rules, like !bin/ was not working correctly: they were interpreted too broad, resulting in unexpected untracked files which should actually be ignored Bug: 409664 Change-Id: I0a422fd6607941461bf2175c9105a0311612efa0 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | DfsReaderIoStats: Clarify that "blocks" are really cache missesDave Borowitz2018-02-221-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous wording was ambiguous as to whether these were blocks requested from the cache (hits + misses) or read from underlying storage (misses only). They are in fact recording only misses: Accumulator#{readBlock,readBlockBytes,readBlockMicros} are only incremented from BlockBasedFile#readOneBlock, which is only called from the cache miss path in DfsBlockCache#getOrLoad (line 391). Change-Id: I0135cd1e76d09c1e28e0f1833b34c312511c66ce
* | PathMatcher: fix handling of **/Marc Strapetz2018-02-228-46/+81
| | | | | | | | | | | | | | **/ should match only directories, but not files Change-Id: I885c83e5912cac5bff338ba657faf6bb9ec94064 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>