'Saves the worktree in a stash
This prompts the user for a stash name and creates
a git stash named accordingly.'

def stash_save(self):

    (stash_name, ok) = qtutils.prompt(N_(u'Save    Stash'), N_(u'Enter    a    name    for    the    stash'))
    if ((not ok) or (not stash_name)):
        return
    stash_name = utils.sanitize(stash_name)
    if (stash_name in self.names):
        qtutils.critical(N_(u'Error:    Stash    exists'), (N_(u'A    stash    named    "%s"    already    exists') % stash_name))
        return
    keep_index = self.keep_index.isChecked()
    cmds.do(SaveStash, stash_name, keep_index)
    self.accept()
    cmds.do(cmds.Rescan)
