Document that repo returned by SubmoduleAddCommand needs to be closed

Bug: 448570
Change-Id: I05be0a5b07f8e22f55637b9a3080362978368bcb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2015-01-22 00:24:30 +01:00
parent 3623aa0c54
commit 83d7ea1988
1 changed files with 11 additions and 0 deletions

View File

@ -136,6 +136,17 @@ protected boolean submoduleExists() throws IOException {
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 {
checkCallable();
if (path == null || path.length() == 0)