Package org.eclipse.jgit.api
Class SubmoduleUpdateCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<Collection<String>>
org.eclipse.jgit.api.TransportCommand<SubmoduleUpdateCommand,Collection<String>>
org.eclipse.jgit.api.SubmoduleUpdateCommand
- All Implemented Interfaces:
Callable<Collection<String>>
public class SubmoduleUpdateCommand
extends TransportCommand<SubmoduleUpdateCommand,Collection<String>>
A class used to execute a submodule update command.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CloneCommand.Callback
private boolean
private FetchCommand.Callback
private ProgressMonitor
private final Collection
<String> private MergeStrategy
Fields inherited from class org.eclipse.jgit.api.TransportCommand
credentialsProvider, timeout, transportConfigCallback
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for SubmoduleUpdateCommand. -
Method Summary
Modifier and TypeMethodDescriptionAdd repository-relative submodule path to initializecall()
Execute the SubmoduleUpdateCommand command.private Repository
getOrCloneSubmodule
(SubmoduleWalk generator, String url) setCallback
(CloneCommand.Callback callback) Set status callback for submodule clone operation.setFetch
(boolean fetch) Whether to fetch the submodules before we update them.setFetchCallback
(FetchCommand.Callback callback) Set status callback for submodule fetch operation.setProgressMonitor
(ProgressMonitor monitor) The progress monitor associated with the clone operation.setStrategy
(MergeStrategy strategy) Setter for the fieldstrategy
.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
-
Field Details
-
monitor
-
paths
-
strategy
-
callback
-
fetchCallback
-
fetch
private boolean fetch
-
-
Constructor Details
-
SubmoduleUpdateCommand
Constructor for SubmoduleUpdateCommand.
- Parameters:
repo
- aRepository
object.
-
-
Method Details
-
setProgressMonitor
The progress monitor associated with the clone operation. By default, this is set toNullProgressMonitor
- Parameters:
monitor
- aProgressMonitor
object.- Returns:
- this command
- See Also:
-
setFetch
Whether to fetch the submodules before we update them. By default, this is set tofalse
- Parameters:
fetch
- whether to fetch the submodules before we update them- Returns:
- this command
- Since:
- 4.9
-
addPath
Add repository-relative submodule path to initialize- Parameters:
path
- (with/
as separator)- Returns:
- this command
-
getOrCloneSubmodule
private Repository getOrCloneSubmodule(SubmoduleWalk generator, String url) throws IOException, GitAPIException - Throws:
IOException
GitAPIException
-
call
public Collection<String> call() throws InvalidConfigurationException, NoHeadException, ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException, NoHeadException, RefNotFoundException, GitAPIExceptionExecute the command Execute the SubmoduleUpdateCommand command.
- Specified by:
call
in interfaceCallable<Collection<String>>
- Specified by:
call
in classGitCommand<Collection<String>>
- Throws:
InvalidConfigurationException
NoHeadException
ConcurrentRefUpdateException
CheckoutConflictException
InvalidMergeHeadsException
WrongRepositoryStateException
NoMessageException
RefNotFoundException
GitAPIException
-
setStrategy
Setter for the fieldstrategy
.- Parameters:
strategy
- The merge strategy to use during this update operation.- Returns:
this
- Since:
- 3.4
-
setCallback
Set status callback for submodule clone operation.- Parameters:
callback
- the callback- Returns:
this
- Since:
- 4.8
-
setFetchCallback
Set status callback for submodule fetch operation.- Parameters:
callback
- the callback- Returns:
this
- Since:
- 4.9
-