nl_tokens: Fetch the list of branches in the repository and update them all . Will clear the WorkingStates of all branches that have updated .
pl_tokens: function fetchBranches ( repoState , driver ) { const oldBranches = repoState . getBranches ( ) ; return driver . fetchBranches ( ) . <mask> ( ( branches ) => { return repoState . set ( 'branches' , branches ) ; } ) . then ( function refreshWorkingStates ( repoState ) { // Remove outdated WorkingStates return oldBranches . reduce ( ( repoState , oldBranch ) => { const fullName = oldBranch . getFullName ( ) ; const newBranch = repoState . getBranch ( fullName ) ; if ( newBranch === null || newBranch . getSha ( ) !== oldBranch . getSha ( ) ) { // Was removed OR updated return updateWorkingState ( repoState , oldBranch , null ) ; } else { // Unchanged return repoState ; } } , repoState ) ; } ) ; }