Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2015-01-21 23:23:13 +0000
committerMatthias Sohn2015-01-21 23:23:13 +0000
commit3623aa0c54ae9bfd0afd65386d7ec529857bd2f8 (patch)
treea5310978fc80cf4ad13f21fb4a58f73f8162111b
parente7f153bf3a28139a40faf5dde5270da0ce50aa4b (diff)
downloadjgit-3623aa0c54ae9bfd0afd65386d7ec529857bd2f8.tar.gz
jgit-3623aa0c54ae9bfd0afd65386d7ec529857bd2f8.tar.xz
jgit-3623aa0c54ae9bfd0afd65386d7ec529857bd2f8.zip
Document that Git instance returned by CloneCommand needs to be closed
Bug: 448570 Change-Id: Ieee334f4d82cd71ba98b26abb8667e8f64cac665 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
index de24dadff6..f058f799d3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -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

Back to the top