/** * {@inheritDoc} * <p> * Executes the {@code 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. */ @Override public Status call() throws GitAPIException, NoWorkTreeException { if (workingTreeIt == null) workingTreeIt = new FileTreeIterator(repo); try { IndexDiff diff = new IndexDiff(repo, Constants.HEAD, workingTreeIt); if (ignoreSubmoduleMode != null) diff.setIgnoreSubmoduleMode(ignoreSubmoduleMode); if (paths != null) diff.setFilter(PathFilterGroup.createFromStrings(paths)); if (progressMonitor == null) diff.diff(); else diff.diff(progressMonitor, ProgressMonitor.UNKNOWN, ProgressMonitor.UNKNOWN, ""); //$NON-NLS-1$ return new Status(diff); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }
/** * Executes the {@code 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. * * @return a {@link Status} object telling about each path where working * tree, index or HEAD differ from each other. */ public Status call() throws GitAPIException, NoWorkTreeException { if (workingTreeIt == null) workingTreeIt = new FileTreeIterator(repo); try { IndexDiff diff = new IndexDiff(repo, Constants.HEAD, workingTreeIt); if (ignoreSubmoduleMode != null) diff.setIgnoreSubmoduleMode(ignoreSubmoduleMode); if (paths != null) diff.setFilter(PathFilterGroup.createFromStrings(paths)); if (progressMonitor == null) diff.diff(); else diff.diff(progressMonitor, ProgressMonitor.UNKNOWN, ProgressMonitor.UNKNOWN, ""); //$NON-NLS-1$ return new Status(diff); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }
/** * {@inheritDoc} * <p> * Executes the {@code 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. */ @Override public Status call() throws GitAPIException, NoWorkTreeException { if (workingTreeIt == null) workingTreeIt = new FileTreeIterator(repo); try { IndexDiff diff = new IndexDiff(repo, Constants.HEAD, workingTreeIt); if (ignoreSubmoduleMode != null) diff.setIgnoreSubmoduleMode(ignoreSubmoduleMode); if (paths != null) diff.setFilter(PathFilterGroup.createFromStrings(paths)); if (progressMonitor == null) diff.diff(); else diff.diff(progressMonitor, ProgressMonitor.UNKNOWN, ProgressMonitor.UNKNOWN, ""); //$NON-NLS-1$ return new Status(diff); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } }