def run(self, edit, cached=False):
        # check if file is saved
        filename = self.view.file_name()
        if not filename:
            sublime.error_message('Cannot do git-diff on unsaved files.')
            return

        repo = self.get_repo()
        if not repo:
            return

        # check if file is known to git
        in_git = self.file_in_git(repo, filename)
        if not in_git:
            sublime.error_message(filename.replace(repo, '').lstrip('/') % 'The file %s is not tracked by git.')
            return

        self.view.window().run_command('git_diff', {'repo': repo, 'path': filename, 'cached': cached})
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/diff.py/GitDiffCurrentFileCommand.run/swapped operands of `%`