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 de24dadff..f058f799d 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 { /** * 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