Merge changes I05be0a5b,Ieee334f4
* changes: Document that repo returned by SubmoduleAddCommand needs to be closed Document that Git instance returned by CloneCommand needs to be closed
This commit is contained in:
commit
8f8724c857
|
@ -114,6 +114,12 @@ public CloneCommand() {
|
||||||
/**
|
/**
|
||||||
* Executes the {@code Clone} command.
|
* 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
|
* @return the newly created {@code Git} object with associated repository
|
||||||
* @throws InvalidRemoteException
|
* @throws InvalidRemoteException
|
||||||
* @throws org.eclipse.jgit.api.errors.TransportException
|
* @throws org.eclipse.jgit.api.errors.TransportException
|
||||||
|
|
|
@ -136,6 +136,17 @@ protected boolean submoduleExists() throws IOException {
|
||||||
return SubmoduleWalk.forIndex(repo).setFilter(filter).next();
|
return SubmoduleWalk.forIndex(repo).setFilter(filter).next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes the {@code SubmoduleAddCommand}
|
||||||
|
*
|
||||||
|
* The {@code Repository} instance returned by this command needs to be
|
||||||
|
* closed by the caller to free resources held by the {@code Repository}
|
||||||
|
* instance. It is recommended to call this method as soon as you don't need
|
||||||
|
* a reference to this {@code Repository} instance anymore.
|
||||||
|
*
|
||||||
|
* @return the newly created {@link Repository}
|
||||||
|
* @throws GitAPIException
|
||||||
|
*/
|
||||||
public Repository call() throws GitAPIException {
|
public Repository call() throws GitAPIException {
|
||||||
checkCallable();
|
checkCallable();
|
||||||
if (path == null || path.length() == 0)
|
if (path == null || path.length() == 0)
|
||||||
|
|
Loading…
Reference in New Issue