src/utils/change.js
function revertForFile(repoState, filePath) {
    let workingState = repoState.getCurrentState();

    // Remove file from changes map
    const changes = workingState.getChanges().delete(filePath);

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

    // Remove file from changes map
    const changes = workingState.getChanges().delete(filePath);

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