def run(self, refresh_only=False):
        repo = self.get_repo(silent=True if refresh_only else False)
        if not repo:
            return

        title = GIT_STATUS_VIEW_TITLE_PREFIX + os.path.basename(repo)

        view = find_view_by_settings(self.window, git_view='status', git_repo=repo)
        if not view and not refresh_only:
            view = self.window.new_file()

            view.set_name(title)
            view.set_syntax_file(GIT_STATUS_VIEW_SYNTAX)
            view.set_scratch(True)
            view.set_read_only(True)

            view.settings().set('git_view', 'status')
            view.settings().set('git_repo', repo)
            view.settings().set('__vi_external_disable', get_setting('git_status_disable_vintageous') is True)

            for key, val in list(GIT_STATUS_VIEW_SETTINGS.items()):
                view.settings().set(key, val)

        if view is not None:
            self.window.focus_view(view)
            view.run_command('git_status_refresh')
dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/status.py/GitStatusCommand.run/original