]> source.dussan.org Git - jgit.git/commitdiff
Document that Git instance returned by CloneCommand needs to be closed 84/40084/1
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 21 Jan 2015 23:23:13 +0000 (00:23 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 21 Jan 2015 23:23:13 +0000 (00:23 +0100)
Bug: 448570
Change-Id: Ieee334f4d82cd71ba98b26abb8667e8f64cac665
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

index de24dadff64439b5671befff1734de79a72c5725..f058f799d39044eca31ee6a240d0e8fddfae29c7 100644 (file)
@@ -114,6 +114,12 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
        /**
         * Executes the {@code Clone} command.
         *
+        * The Git instance returned by this command needs to be closed by the
+        * caller to free resources held by the underlying {@link Repository}
+        * instance. It is recommended to call this method as soon as you don't need
+        * a reference to this {@link Git} instance and the underlying
+        * {@link Repository} instance anymore.
+        *
         * @return the newly created {@code Git} object with associated repository
         * @throws InvalidRemoteException
         * @throws org.eclipse.jgit.api.errors.TransportException