diff options
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java index 09e4cf0a1b..06c8f414e3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java @@ -136,6 +136,17 @@ public class SubmoduleAddCommand extends 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) |