Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse2017-06-16 03:52:31 +0000
committerDavid Pursehouse2017-06-16 03:52:31 +0000
commitb4a46b5ed0e33f0a958ba809c648f46e5a19abd7 (patch)
tree7673a037e40b6d31d6af654428ed9f6a436b5fef
parenta45b045c7378c3685d7b0a39173b69c87efe7371 (diff)
downloadjgit-b4a46b5ed0e33f0a958ba809c648f46e5a19abd7.tar.gz
jgit-b4a46b5ed0e33f0a958ba809c648f46e5a19abd7.tar.xz
jgit-b4a46b5ed0e33f0a958ba809c648f46e5a19abd7.zip
Fetch/PullCommand: Improve Javadoc of setRecurseSubmodules
Annotate the `recurse` parameter as @Nullable and expand the Javadoc to clarify the precedence of options. Change-Id: I7aee800cdbf8243133a0d353ef79b97b67ce011e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java4
2 files changed, 13 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
index 785c20c8af..485315968a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
@@ -48,6 +48,7 @@ import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.InvalidConfigurationException;
import org.eclipse.jgit.api.errors.InvalidRemoteException;
@@ -258,11 +259,19 @@ public class FetchCommand extends TransportCommand<FetchCommand, FetchResult> {
* Set the mode to be used for recursing into submodules.
*
* @param recurse
+ * corresponds to the
+ * --recurse-submodules/--no-recurse-submodules options. If
+ * {@code null} use the value of the
+ * {@code submodule.name.fetchRecurseSubmodules} option
+ * configured per submodule. If not specified there, use the
+ * value of the {@code fetch.recurseSubmodules} option configured
+ * in git config. If not configured in either, "on-demand" is the
+ * built-in default.
* @return {@code this}
* @since 4.7
*/
public FetchCommand setRecurseSubmodules(
- FetchRecurseSubmodulesMode recurse) {
+ @Nullable FetchRecurseSubmodulesMode recurse) {
checkCallable();
submoduleRecurseMode = recurse;
return this;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
index 9c5ae432e2..f741a247d5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
@@ -47,6 +47,7 @@ package org.eclipse.jgit.api;
import java.io.IOException;
import java.text.MessageFormat;
+import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.api.RebaseCommand.Operation;
import org.eclipse.jgit.api.errors.CanceledException;
import org.eclipse.jgit.api.errors.DetachedHeadException;
@@ -438,9 +439,10 @@ public class PullCommand extends TransportCommand<PullCommand, PullResult> {
* @param recurse
* @return {@code this}
* @since 4.7
+ * @see FetchCommand#setRecurseSubmodules(FetchRecurseSubmodulesMode)
*/
public PullCommand setRecurseSubmodules(
- FetchRecurseSubmodulesMode recurse) {
+ @Nullable FetchRecurseSubmodulesMode recurse) {
this.submoduleRecurseMode = recurse;
return this;
}

Back to the top