Browse Source

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>
stable-4.9
David Pursehouse 8 years ago
parent
commit
b4a46b5ed0
  1. 11
      org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java

11
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;

4
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;
}

Loading…
Cancel
Save