nl_tokens: Returns true if the given file has the same content in both RepositoryState s current working state or is absent from both .
pl_tokens: function hasChanged ( previousState , newState , filepath ) { const previouslyExists = exists ( previousState , filepath ) ; const newExists = exists ( newState , filepath ) ; if ( ! previouslyExists && ! newExists ) { // Still non existing return <mask> ; } else if ( exists ( previousState , filepath ) !== exists ( newState , filepath ) ) { // The file is absent from one return true ; } else { // Both files exist const prevWorking = previousState . getCurrentState ( ) ; const newWorking = newState . getCurrentState ( ) ; const prevSha = WorkingUtils . findSha ( prevWorking , filepath ) ; const newSha = WorkingUtils . findSha ( newWorking , filepath ) ; if ( prevSha === null && newSha === null ) { // Both have are in pending changes. We can compare their contents return read ( previousState , filepath ) . getAsString ( ) !== read ( newState , filepath ) . getAsString ( ) ; } else { // Content changed if Shas are different, or one of them is null return prevSha !== newSha ; } } }