]> source.dussan.org Git - jgit.git/commitdiff
Document that repo returned by SubmoduleAddCommand needs to be closed 85/40085/2
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 21 Jan 2015 23:24:30 +0000 (00:24 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 22 Jan 2015 16:25:06 +0000 (17:25 +0100)
Bug: 448570
Change-Id: I05be0a5b07f8e22f55637b9a3080362978368bcb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java

index 09e4cf0a1b11de0331537302826da6b72e39fed8..06c8f414e345b33eff9a43ba18baf1c3fcca0ecf 100644 (file)
@@ -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)