public class StatusCommand extends GitCommand<Status>
Status command. It has setters for all
supported options and arguments of this command and a call() method
to finally execute the command. Each instance of this class should only be
used for one invocation of the command (means: one call to call())| Modifier and Type | Field and Description |
|---|---|
private SubmoduleWalk.IgnoreSubmoduleMode |
ignoreSubmoduleMode |
private java.util.List<java.lang.String> |
paths |
private ProgressMonitor |
progressMonitor |
private WorkingTreeIterator |
workingTreeIt |
repo| Modifier | Constructor and Description |
|---|---|
protected |
StatusCommand(Repository repo)
Constructor for StatusCommand.
|
| Modifier and Type | Method and Description |
|---|---|
StatusCommand |
addPath(java.lang.String path)
Show only the status of files which match the given paths.
|
Status |
call() |
java.util.List<java.lang.String> |
getPaths()
Returns the paths filtering this status.
|
StatusCommand |
setIgnoreSubmodules(SubmoduleWalk.IgnoreSubmoduleMode mode)
Whether to ignore submodules
|
StatusCommand |
setProgressMonitor(ProgressMonitor progressMonitor)
To set the
ProgressMonitor which contains
callback methods to inform you about the progress of this command. |
StatusCommand |
setWorkingTreeIt(WorkingTreeIterator workingTreeIt)
To set the
WorkingTreeIterator which
should be used. |
checkCallable, getRepository, setCallableprivate WorkingTreeIterator workingTreeIt
private java.util.List<java.lang.String> paths
private ProgressMonitor progressMonitor
private SubmoduleWalk.IgnoreSubmoduleMode ignoreSubmoduleMode
protected StatusCommand(Repository repo)
repo - a Repository object.public StatusCommand setIgnoreSubmodules(SubmoduleWalk.IgnoreSubmoduleMode mode)
mode - the
SubmoduleWalk.IgnoreSubmoduleModethispublic StatusCommand addPath(java.lang.String path)
path - repository-relative path of file/directory to show status for
(with / as separator)thispublic java.util.List<java.lang.String> getPaths()
null if
the complete status for the whole repo is shown.public Status call() throws GitAPIException, NoWorkTreeException
Execute the command
Executes the Status command with all the options and parameters
collected by the setter methods of this class. Each instance of this
class should only be used for one invocation of the command. Don't call
this method twice on an instance.
call in interface java.util.concurrent.Callable<Status>call in class GitCommand<Status>GitAPIExceptionNoWorkTreeExceptionpublic StatusCommand setWorkingTreeIt(WorkingTreeIterator workingTreeIt)
WorkingTreeIterator which
should be used. If this method is not called a standard
FileTreeIterator is used.workingTreeIt - a working tree iteratorthispublic StatusCommand setProgressMonitor(ProgressMonitor progressMonitor)
ProgressMonitor which contains
callback methods to inform you about the progress of this command.progressMonitor - a ProgressMonitor object.this