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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubmoduleInitCommand
public SubmoduleInitCommand(Repository repo)
- Parameters:
repo
-
addPath
public SubmoduleInitCommand addPath(String path)
- Add repository-relative submodule path to initialize
- Parameters:
path
-
- Returns:
- this command
call
public Collection<String> call()
throws GitAPIException
- Description copied from class:
GitCommand
- Executes the command
- Specified by:
call
in interface Callable<Collection<String>>
- Specified by:
call
in class GitCommand<Collection<String>>
- Returns:
- T a result. Each command has its own return type
- Throws:
GitAPIException
- or subclass thereof when an error occurs
Copyright © 2012. All Rights Reserved.