Class StatusCommand

  • All Implemented Interfaces:
    Callable<Status>

    public class StatusCommand
    extends GitCommand<Status>
    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:
    Git documentation about Status
    • Constructor Detail

      • StatusCommand

        protected StatusCommand​(Repository repo)
        Constructor for StatusCommand.
        Parameters:
        repo - a Repository object.
    • Method Detail

      • addPath

        public StatusCommand addPath​(String path)
        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

        public List<String> 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