Browse Source

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>
tags/v3.7.0.201502031740-rc1
Matthias Sohn 9 years ago
parent
commit
3623aa0c54
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

+ 6
- 0
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java View 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

Loading…
Cancel
Save