nl_tokens: Attempts to find a SHA if available for the given file
pl_tokens: function findSha ( workingState , filepath ) { // Lookup potential changes const change = workingState . getChanges ( ) . <mask> ( filepath ) ; // Else lookup tree const treeEntry = workingState . getTreeEntries ( ) . get ( filepath ) ; if ( change ) { if ( change . getType ( ) == CHANGES . REMOVE ) { throw error . fileNotFound ( filepath ) ; } else { return change . getSha ( ) ; } } else if ( treeEntry ) { return treeEntry . getSha ( ) ; } else { throw error . fileNotFound ( filepath ) ; } }