Package org.eclipse.jgit.api
Class StatusCommand
A class used to execute a
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()
)- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StatusCommand
(Repository repo) Constructor for StatusCommand. -
Method Summary
Modifier and TypeMethodDescriptionShow only the status of files which match the given paths.call()
getPaths()
Returns the paths filtering this status.Whether to ignore submodulessetProgressMonitor
(ProgressMonitor progressMonitor) To set theProgressMonitor
which contains callback methods to inform you about the progress of this command.setWorkingTreeIt
(WorkingTreeIterator workingTreeIt) To set theWorkingTreeIterator
which should be used.Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
Field Details
-
workingTreeIt
-
paths
-
progressMonitor
-
ignoreSubmoduleMode
-
-
Constructor Details
-
StatusCommand
Constructor for StatusCommand.- Parameters:
repo
- aRepository
object.
-
-
Method Details
-
setIgnoreSubmodules
Whether to ignore submodules- Parameters:
mode
- theSubmoduleWalk.IgnoreSubmoduleMode
- Returns:
this
- Since:
- 3.6
-
addPath
Show only the status of files which match the given paths. The path must either name a file or a directory exactly. All paths are always relative to the repository root. If a directory is specified all files recursively underneath that directory are matched. If this method is called multiple times then the status of those files is reported which match at least one of the given paths. Note that regex expressions or wildcards are not supported.- Parameters:
path
- repository-relative path of file/directory to show status for (with/
as separator)- Returns:
this
- Since:
- 3.1
-
getPaths
Returns the paths filtering this status.- Returns:
- the paths for which the status is shown or
null
if the complete status for the whole repo is shown. - Since:
- 3.1
-
call
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.- Specified by:
call
in interfaceCallable<Status>
- Specified by:
call
in classGitCommand<Status>
- Throws:
GitAPIException
NoWorkTreeException
-
setWorkingTreeIt
To set theWorkingTreeIterator
which should be used. If this method is not called a standardFileTreeIterator
is used.- Parameters:
workingTreeIt
- a working tree iterator- Returns:
this
-
setProgressMonitor
To set theProgressMonitor
which contains callback methods to inform you about the progress of this command.- Parameters:
progressMonitor
- aProgressMonitor
object.- Returns:
this
- Since:
- 3.1
-