Package org.eclipse.jgit.api
Class SubmoduleUpdateCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<T>
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.Callbackprivate booleanprivate FetchCommand.Callbackprivate ProgressMonitorprivate final Collection<String>private MergeStrategyFields inherited from class org.eclipse.jgit.api.TransportCommand
credentialsProvider, timeout, transportConfigCallbackFields 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 RepositorygetOrCloneSubmodule(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, setTransportConfigCallbackMethods 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- aRepositoryobject.
-
-
Method Details
-
setProgressMonitor
The progress monitor associated with the clone operation. By default, this is set toNullProgressMonitor- Parameters:
monitor- aProgressMonitorobject.- 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:
IOExceptionGitAPIException
-
call
public Collection<String> call() throws InvalidConfigurationException, NoHeadException, ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException, NoHeadException, RefNotFoundException, GitAPIExceptionExecute the command Execute the SubmoduleUpdateCommand command.
- Specified by:
callin interfaceCallable<Collection<String>>- Specified by:
callin classGitCommand<Collection<String>>- Throws:
InvalidConfigurationExceptionNoHeadExceptionConcurrentRefUpdateExceptionCheckoutConflictExceptionInvalidMergeHeadsExceptionWrongRepositoryStateExceptionNoMessageExceptionNoHeadExceptionRefNotFoundExceptionGitAPIException
-
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
-