public class SubmoduleUpdateCommand extends TransportCommand<SubmoduleUpdateCommand,java.util.Collection<java.lang.String>>
Modifier and Type | Field and Description |
---|---|
private CloneCommand.Callback |
callback |
private boolean |
fetch |
private FetchCommand.Callback |
fetchCallback |
private ProgressMonitor |
monitor |
private java.util.Collection<java.lang.String> |
paths |
private MergeStrategy |
strategy |
credentialsProvider, timeout, transportConfigCallback
repo
Constructor and Description |
---|
SubmoduleUpdateCommand(Repository repo)
Constructor for SubmoduleUpdateCommand.
|
Modifier and Type | Method and Description |
---|---|
SubmoduleUpdateCommand |
addPath(java.lang.String path)
Add repository-relative submodule path to initialize
|
java.util.Collection<java.lang.String> |
call()
Execute the SubmoduleUpdateCommand command.
|
private Repository |
getOrCloneSubmodule(SubmoduleWalk generator,
java.lang.String url) |
SubmoduleUpdateCommand |
setCallback(CloneCommand.Callback callback)
Set status callback for submodule clone operation.
|
SubmoduleUpdateCommand |
setFetch(boolean fetch)
Whether to fetch the submodules before we update them.
|
SubmoduleUpdateCommand |
setFetchCallback(FetchCommand.Callback callback)
Set status callback for submodule fetch operation.
|
SubmoduleUpdateCommand |
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation.
|
SubmoduleUpdateCommand |
setStrategy(MergeStrategy strategy)
Setter for the field
strategy . |
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback
checkCallable, getRepository, setCallable
private ProgressMonitor monitor
private final java.util.Collection<java.lang.String> paths
private MergeStrategy strategy
private CloneCommand.Callback callback
private FetchCommand.Callback fetchCallback
private boolean fetch
public SubmoduleUpdateCommand(Repository repo)
Constructor for SubmoduleUpdateCommand.
repo
- a Repository
object.public SubmoduleUpdateCommand setProgressMonitor(ProgressMonitor monitor)
NullProgressMonitor
monitor
- a ProgressMonitor
object.NullProgressMonitor
public SubmoduleUpdateCommand setFetch(boolean fetch)
false
fetch
- whether to fetch the submodules before we update thempublic SubmoduleUpdateCommand addPath(java.lang.String path)
path
- (with /
as separator)private Repository getOrCloneSubmodule(SubmoduleWalk generator, java.lang.String url) throws java.io.IOException, GitAPIException
java.io.IOException
GitAPIException
public java.util.Collection<java.lang.String> call() throws InvalidConfigurationException, NoHeadException, ConcurrentRefUpdateException, CheckoutConflictException, InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException, NoHeadException, RefNotFoundException, GitAPIException
Execute the command Execute the SubmoduleUpdateCommand command.
call
in interface java.util.concurrent.Callable<java.util.Collection<java.lang.String>>
call
in class GitCommand<java.util.Collection<java.lang.String>>
InvalidConfigurationException
NoHeadException
ConcurrentRefUpdateException
CheckoutConflictException
InvalidMergeHeadsException
WrongRepositoryStateException
NoMessageException
RefNotFoundException
GitAPIException
public SubmoduleUpdateCommand setStrategy(MergeStrategy strategy)
strategy
.strategy
- The merge strategy to use during this update operation.this
public SubmoduleUpdateCommand setCallback(CloneCommand.Callback callback)
callback
- the callbackthis
public SubmoduleUpdateCommand setFetchCallback(FetchCommand.Callback callback)
callback
- the callbackthis