/** * Requires that the local working tree has no un-committed changes * * @throws com.atlassian.jgitflow.core.exception.DirtyWorkingTreeException * @throws com.atlassian.jgitflow.core.exception.JGitFlowIOException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireCleanWorkingTree(boolean allowUntracked) throws DirtyWorkingTreeException, JGitFlowIOException, JGitFlowGitAPIException { CleanStatus cs = GitHelper.workingTreeIsClean(git, allowUntracked); if (cs.isNotClean()) { reporter.errorText(commandName, cs.getMessage()); reporter.flush(); throw new DirtyWorkingTreeException(cs.getMessage()); } }
/** * Requires that the local working tree has no un-committed changes * * @throws com.atlassian.jgitflow.core.exception.DirtyWorkingTreeException * @throws com.atlassian.jgitflow.core.exception.JGitFlowIOException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireCleanWorkingTree(boolean allowUntracked) throws DirtyWorkingTreeException, JGitFlowIOException, JGitFlowGitAPIException { CleanStatus cs = GitHelper.workingTreeIsClean(git, allowUntracked); if (cs.isNotClean()) { reporter.errorText(commandName, cs.getMessage()); reporter.flush(); throw new DirtyWorkingTreeException(cs.getMessage()); } }
/** * Requires that the local working tree has no un-committed changes * @throws DirtyWorkingTreeException * @throws JGitFlowIOException * @throws JGitFlowGitAPIException */ protected void requireCleanWorkingTree() throws DirtyWorkingTreeException, JGitFlowIOException, JGitFlowGitAPIException { CleanStatus cs = GitHelper.workingTreeIsClean(git,isAllowUntracked(),reporter); if (cs.isNotClean()) { reporter.errorText(getCommandName(),cs.getMessage()); reporter.flush(); throw new DirtyWorkingTreeException(cs.getMessage()); } }