[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 86d6417: Add new command vc-git-stash-delete
From: |
Charles A. Roelli |
Subject: |
[Emacs-diffs] master 86d6417: Add new command vc-git-stash-delete |
Date: |
Thu, 22 Mar 2018 15:21:28 -0400 (EDT) |
branch: master
commit 86d6417bf15b7ad5717dec2112f8616f67b2c9d3
Author: Charles A. Roelli <address@hidden>
Commit: Charles A. Roelli <address@hidden>
Add new command vc-git-stash-delete
* lisp/vc/vc-git.el (vc-git-stash-delete): New command, in line with
vc-git-stash-delete-at-point.
(vc-git-extra-menu-map): Add menu entry.
---
lisp/vc/vc-git.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index bf1b050..88052d7 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1388,6 +1388,9 @@ This requires git 1.8.4 or later, for the \"-L\" option
of \"git log\"."
(define-key map [git-grep]
'(menu-item "Git grep..." vc-git-grep
:help "Run the `git grep' command"))
+ (define-key map [git-ds]
+ '(menu-item "Delete Stash..." vc-git-stash-delete
+ :help "Delete a stash"))
(define-key map [git-sn]
'(menu-item "Stash a Snapshot" vc-git-stash-snapshot
:help "Stash the current state of the tree and keep the
current state"))
@@ -1518,6 +1521,12 @@ This command shares argument histories with \\[rgrep]
and \\[grep]."
(vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name)
(vc-resynch-buffer (vc-git-root default-directory) t t))
+(defun vc-git-stash-delete (name)
+ "Delete stash NAME."
+ (interactive (list (vc-git-stash-read "Delete stash: ")))
+ (vc-git-command "*vc-git-stash*" 0 nil "stash" "drop" "-q" name)
+ (vc-resynch-buffer (vc-git-root default-directory) t t))
+
(defun vc-git-stash-snapshot ()
"Create a stash with the current tree state."
(interactive)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 86d6417: Add new command vc-git-stash-delete,
Charles A. Roelli <=