Package org.eclipse.jgit.api
Class SubmoduleInitCommand
- java.lang.Object
-
- org.eclipse.jgit.api.GitCommand<Collection<String>>
-
- org.eclipse.jgit.api.SubmoduleInitCommand
-
- All Implemented Interfaces:
Callable<Collection<String>>
public class SubmoduleInitCommand extends GitCommand<Collection<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)
Constructor for SubmoduleInitCommand.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubmoduleInitCommand
addPath(String path)
Add repository-relative submodule path to initializeCollection<String>
call()
-
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
-
-
-
Constructor Detail
-
SubmoduleInitCommand
public SubmoduleInitCommand(Repository repo)
Constructor for SubmoduleInitCommand.- Parameters:
repo
- aRepository
object.
-
-
Method Detail
-
addPath
public SubmoduleInitCommand addPath(String path)
Add repository-relative submodule path to initialize- Parameters:
path
- (with/
as separator)- Returns:
- this command
-
call
public Collection<String> call() throws GitAPIException
Execute the command
- Specified by:
call
in interfaceCallable<Collection<String>>
- Specified by:
call
in classGitCommand<Collection<String>>
- Throws:
GitAPIException
-
-