src/utils/repo.js
function updateWorkingState(repoState, branch, newWorkingState) {
    let workingStates = repoState.getWorkingStates();

    const key = branch.getFullName();
    if (newWorkingState === null) {
        // Delete
        workingStates = workingStates.delete(key);
    } else {
        // Update the entry in the map
        workingStates = workingStates.set(key, newWorkingState);
    }

    return repoState.set('workingStates', workingStates);
}
function updateWorkingState(repoState, branch, newWorkingState) {
    let workingStates = repoState.getWorkingStates();

    const key = branch.getFullName();
    if (newWorkingState === null) {
        // Delete
        workingStates = workingStates.delete(key);
    } else {
        // Update the entry in the map
        workingStates = workingStates.set(key, newWorkingState);
    }

    return repoState.set('workingStates', workingStates);
}
Change workinState for a specific branch
@param {RepositoryState} repoState
@param {Branch} branch
@param {WorkingState | Null} newWorkingState Pass null to delete
@return {RepositoryState}