summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-magit.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index 4ab9125..9b6c3cd 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -645,6 +645,18 @@ argument. Interactively, this can be accessed using the command
(interactive "P")
(km/magit-diff-visit-file prev-rev t))
+(defun km/magit-stash-edit-message (stash message)
+ "Change STASH's message to MESSAGE."
+ (interactive
+ (let* ((stash (magit-read-stash "Rename" t))
+ (old-msg (magit-git-string "show" "-s" "--format=%s" stash)))
+ (list stash (magit-read-string "Stash message" old-msg))))
+ (let ((commit (magit-rev-parse stash))
+ (inhibit-magit-refresh t))
+ (magit-stash-drop stash)
+ (magit-stash-store message "refs/stash" commit))
+ (magit-refresh))
+
(defun km/git-commit-turn-on-flyspell ()
"Like `git-commit-turn-on-flyspell', but don't check buffer initially."
(setq flyspell-generic-check-word-predicate