src/utils/change.js
function revertForDir(repoState, dirPath) {
    let workingState = repoState.getCurrentState();
    let changes = workingState.getChanges();

    // Remove all changes that are in the directory
    changes = changes.filter((change, filePath) => {
        return !PathUtils.contains(dirPath, filePath);
    });

    // Update workingState and repoState
    workingState = workingState.set('changes', changes);
    return RepoUtils.updateCurrentWorkingState(repoState, workingState);
}
function revertForDir(repoState, dirPath) {
    let workingState = repoState.getCurrentState();
    let changes = workingState.getChanges();

    // Remove all changes that are in the directory
    changes = changes.filter((change, filePath) => {
        return !PathUtils.contains(dirPath, filePath);
    });

    // Update workingState and repoState
    workingState = workingState.set('changes', changes);
    return RepoUtils.updateCurrentWorkingState(repoState, workingState);
}
Revert changes for a specific directory
@param {RepositoryState}
@param {Path}
@return {RepositoryState}