aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse
Commit message (Collapse)AuthorAgeFilesLines
* Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8David Pursehouse2018-03-1127-69/+79
| | | | | Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Constants: Initialize CHARSET and CHARACTER_ENCODING from StandardCharsets.UTF_8David Pursehouse2018-03-111-3/+4
| | | | | Change-Id: Ib4e0a35429892fa1581db09a9b77717120d03275 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove deprecated StreamCopyThread#flushMatthias Sohn2018-03-101-14/+0
| | | | | | | | | | StreamCopyThread: Do not let flush interrupt a write. flush calls interrupt() to interrupt a pending read and trigger a flush. Unfortunately that interrupt() call can also interrupt a pending write, putting Jsch in a bad state and triggering "Short read of block" errors. Change-Id: I11f8a014fd72df06617cc8731d992eb14cc32a67 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated SafeBufferedOutputStreamMatthias Sohn2018-03-101-78/+0
| | | | | | | | | | Use Java 8 BufferedOutputStream instead. Java 8 fixed the silent flush during close issue by FilterOutputStream (base class of BufferedOutputStream) using try-with-resources to close the stream, getting a behavior matching what JGit's SafeBufferedOutputStream was doing Change-Id: Ieeab59f49b44519585abda213d287b19c7863b17 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated EolCanonicalizingInputStreamMatthias Sohn2018-03-101-102/+0
| | | | | | Use AutoLFInputStream instead. Change-Id: If3765c425eed3a52d0c6aa8c7ea4925bb2e87395 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated FileUtils#relativize(String, String)Matthias Sohn2018-03-101-27/+0
| | | | | | | | | Use the more-clearly-named FileUtils#relativizeNativePath(String, String) instead, or directly call FileUtils#relativizePath(String, String, String, boolean). Change-Id: I9b56302c94630c75293d8cf5510e1d2f22f2b778 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated FileUtil using Java 7 NIOMatthias Sohn2018-03-101-303/+0
| | | | Change-Id: I180a7a0bf9fe36c42edab9fffc6c05d983c229a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated TreeWalk#getEolStreamTypeMatthias Sohn2018-03-101-16/+0
| | | | | | Use TreeWalk#getEolStreamType(OperationType) instead. Change-Id: I0f102ddf36102ff55a71448e376ed08743da5d1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated FileTreeIterator(WorkingTreeIterator, File, FS)Matthias Sohn2018-03-101-21/+0
| | | | | | | Use FileTreeIterator#FileTreeIterator(FileTreeIterator, File, FS) instead. Change-Id: I675e14863a1a387e7da9fc5148feffaf55d4ad39 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated TransportHttp#httpOpen(String, URL)Matthias Sohn2018-03-101-15/+0
| | | | | | Use TransportHttp#httpOpen(String, URL, AcceptEncoding) instead. Change-Id: I4ad423175daa5499caad9cccb88076d371331569 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated ResolveMerger#processEntry methodMatthias Sohn2018-03-101-55/+0
| | | | Change-Id: I687965f6e9f3bcafa28afd62621fea240b36939d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated Repository#getRefMatthias Sohn2018-03-101-22/+4
| | | | | | Use Repository#exactRef(String) or Repository#findRef(String) instead. Change-Id: I5c547a26604b4cd792111c699df5f3c9d955d3f2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated BitmapBuilder#addMatthias Sohn2018-03-102-29/+0
| | | | | | Use BitmapBuilder#or or BitmapBuilder#addObject instead. Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated LockFile(File, FS) constructorMatthias Sohn2018-03-101-18/+0
| | | | | | | Use org.eclipse.jgit.internal.storage.file.LockFile#LockFile(File) instead. Change-Id: I107d9879c02a2006799a238ccaddf87c89f33f77 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated IgnoreNode#isIgnored methodMatthias Sohn2018-03-101-29/+0
| | | | | | Parameter negateFirstMatch is not honored anymore Change-Id: Idff1a92643c1431c7e34a7730f8414135e1ac196 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix misspelled class name: EmtpyCommitException -> EmptyCommitExceptionDavid Pursehouse2018-03-102-8/+8
| | | | | Change-Id: I55196020146f26951988988c14ac9a6f85061ae2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove deprecated Statistics, UploadPackLogger, UploadPackLoggerChainMatthias Sohn2018-03-104-499/+0
| | | | | | | | | Use PackStatistics and PostUploadHook and PostUploadHookChain instead. Also remove - UploadPack#getPackStatistics replaced by #getStatistics - UploadPack#getLogger and UploadPack#setLogger Change-Id: I70881c539af3094d68d594f19983dea0973604e8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove deprecated StoredObjectRepresentationnotAvailableException ctorMatthias Sohn2018-03-091-15/+0
| | | | | | | Use #StoredObjectRepresentationNotAvailableException(ObjectToPack, Throwable) instead. Change-Id: I766e00bc7292c7bd025aa2d7c54f10d278c7fabd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* 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>
* 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>
* | 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>
* | 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>
* | 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>