Package org.eclipse.jgit.api
Class SubmoduleInitCommand
- java.lang.Object
-
- org.eclipse.jgit.api.GitCommand<java.util.Collection<java.lang.String>>
-
- org.eclipse.jgit.api.SubmoduleInitCommand
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.util.Collection<java.lang.String>>
public class SubmoduleInitCommand extends GitCommand<java.util.Collection<java.lang.String>>
A class used to execute a submodule init command. This will copy the 'url' and 'update' fields from the working tree .gitmodules file to a repository's config file for each submodule not currently present in the repository's config file.- See Also:
- Git documentation about submodules
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
-
Constructor Summary
Constructors Constructor Description SubmoduleInitCommand(Repository repo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubmoduleInitCommand
addPath(java.lang.String path)
Add repository-relative submodule path to initializejava.util.Collection<java.lang.String>
call()
Executes the command-
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
-
-
-
Constructor Detail
-
SubmoduleInitCommand
public SubmoduleInitCommand(Repository repo)
- Parameters:
repo
-
-
-
Method Detail
-
addPath
public SubmoduleInitCommand addPath(java.lang.String path)
Add repository-relative submodule path to initialize- Parameters:
path
- (with/
as separator)- Returns:
- this command
-
call
public java.util.Collection<java.lang.String> call() throws GitAPIException
Description copied from class:GitCommand
Executes the command- Specified by:
call
in interfacejava.util.concurrent.Callable<java.util.Collection<java.lang.String>>
- Specified by:
call
in classGitCommand<java.util.Collection<java.lang.String>>
- Returns:
- T a result. Each command has its own return type
- Throws:
GitAPIException
- or subclass thereof when an error occurs
-
-