Package org.eclipse.jgit.api
Class SubmoduleUpdateCommand
- java.lang.Object
-
- org.eclipse.jgit.api.GitCommand<T>
-
- org.eclipse.jgit.api.TransportCommand<SubmoduleUpdateCommand,java.util.Collection<java.lang.String>>
-
- org.eclipse.jgit.api.SubmoduleUpdateCommand
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.util.Collection<java.lang.String>>
public class SubmoduleUpdateCommand extends TransportCommand<SubmoduleUpdateCommand,java.util.Collection<java.lang.String>>
A class used to execute a submodule update command.- See Also:
- Git documentation about submodules
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.api.TransportCommand
credentialsProvider, timeout, transportConfigCallback
-
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
-
Constructor Summary
Constructors Constructor Description SubmoduleUpdateCommand(Repository repo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubmoduleUpdateCommand
addPath(java.lang.String path)
Add repository-relative submodule path to initializejava.util.Collection<java.lang.String>
call()
Execute the SubmoduleUpdateCommand command.SubmoduleUpdateCommand
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation.SubmoduleUpdateCommand
setStrategy(MergeStrategy strategy)
-
Methods inherited from class org.eclipse.jgit.api.TransportCommand
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback
-
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
-
-
-
Constructor Detail
-
SubmoduleUpdateCommand
public SubmoduleUpdateCommand(Repository repo)
- Parameters:
repo
-
-
-
Method Detail
-
setProgressMonitor
public SubmoduleUpdateCommand setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation. By default, this is set toNullProgressMonitor
- Parameters:
monitor
-- Returns:
- this command
- See Also:
NullProgressMonitor
-
addPath
public SubmoduleUpdateCommand 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 InvalidConfigurationException, NoHeadException, ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException, NoHeadException, RefNotFoundException, GitAPIException
Execute the SubmoduleUpdateCommand 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:
- a collection of updated submodule paths
- Throws:
ConcurrentRefUpdateException
CheckoutConflictException
InvalidMergeHeadsException
InvalidConfigurationException
NoHeadException
NoMessageException
RefNotFoundException
WrongRepositoryStateException
GitAPIException
-
setStrategy
public SubmoduleUpdateCommand setStrategy(MergeStrategy strategy)
- Parameters:
strategy
- The merge strategy to use during this update operation.- Returns:
this
- Since:
- 3.4
-
-