def reset_deleted_files(self):
        """
        Runs the equivalent of git checkout -- <file> for each file that was
        deleted. This allows us to delete a file, hit an interact link, then get a
        clean version of the file again.
        """

        yield from self.ensure_lock()
        deleted_files = subprocess.check_output([
            'git', 'ls-files', '--deleted'
        ], cwd=self.repo_dir).decode().strip().split('\n')

        for filename in deleted_files:
            if filename:  # Filter out empty lines
                yield from execute_cmd(['git', 'checkout', '--', filename], cwd=self.repo_dir)
def reset_deleted_files ( self ) : yield from self . ensure_lock ( ) deleted_files = subprocess . check_output ( [ 'git' , 'ls-files' , '--deleted' ] , cwd = self . repo_dir ) . decode ( ) . strip ( ) . split ( '\n' ) for filename in deleted_files : if filename : yield from execute_cmd ( [ 'git' , 'checkout' , '--' , filename ] , cwd = self . repo_dir )
Runs the equivalent of git checkout -- <file> for each file that was
        deleted. This allows us to delete a file, hit an interact link, then get a
        clean version of the file again.