

def run(self, untracked=False):
    repo = self.get_repo()
    if (not repo):
        return

    def on_done(title):
        title = title.strip()
        self.git(['stash', 'save', ('--include-untracked' if untracked else None), '--', title], cwd=repo)
        self.window.run_command('git_status', {
            'refresh_only': True,
        })
    self.git_exit_code(['update-index', '--refresh'], cwd=repo)
    (untracked_files, unstaged_files, _) = self.get_files_status(repo)
    if (not unstaged_files):
        if ((untracked and (not untracked_files)) or (not untracked)):
            return sublime.error_message('No local changes to save')
    self.window.show_input_panel('Stash title:', '', on_done, noop, noop)

dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/stash.py GitStashCommand.run/original