def run(self, edit, path=None, cached=False, run_move=False):
        path = path if path else self.view.settings().get('git_diff_path')
        cached = cached if cached else self.view.settings().get('git_diff_cached')
        unified = self.view.settings().get('git_diff_unified', 3)
        repo = self.view.settings().get('git_repo')

        if path is None or cached is None:
            return

        point = self.view.sel()[0].begin() if self.view.sel() else 0
        row, col = self.view.rowcol(point)

        diff = self.get_diff(repo, path, cached, unified=unified)
        clean = False
        if not diff:
            diff = GIT_DIFF_CLEAN_CACHED if cached else GIT_DIFF_CLEAN
            clean = True

        self.view.settings().set('git_diff_clean', clean)
        self.view.set_read_only(False)
        self.view.replace(edit, sublime.Region(0, self.view.size()), diff)
        self.view.set_read_only(True)

        if run_move:
            self.view.run_command('git_diff_move')
        else:
            row_begin = self.view.text_point(row, 0)
            line = self.view.line(row_begin)
            point = self.view.text_point(row, min(col, (line.end() - line.begin())))
            self.move_to_point(point)
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/diff.py/GitDiffRefreshCommand.run/original