

def discard_stashes(self, repo, stashes):
    stashlist = '\n  '.join([t for (_, t) in stashes])
    msgtemplate = 'Are you sure you want to discard the following stashes?\n\n  {stashes}'
    if sublime.ok_cancel_dialog(msgtemplate.format(stashes=stashlist), 'Discard'):
        nums = reversed(sorted((int(n) for (n, _) in stashes)))
        for n in nums:
            self.git(['stash', 'drop', '--quiet', ('stash@{%s}' % n)], cwd=repo)

dataset/ETHPy150Open SublimeGit/SublimeGit/sgit/status.py GitStatusDiscardCommand.discard_stashes/original