aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles A. Roelli2018-03-22 20:33:45 +0100
committerCharles A. Roelli2018-03-22 20:33:45 +0100
commit86d6417bf15b7ad5717dec2112f8616f67b2c9d3 (patch)
tree9a245858f1bbaeff65534ca34a9c74d57584efd0
parent311bb33218b860413af699ac84e50fccfc1469c0 (diff)
downloademacs-86d6417bf15b7ad5717dec2112f8616f67b2c9d3.tar.gz
emacs-86d6417bf15b7ad5717dec2112f8616f67b2c9d3.zip
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.
-rw-r--r--lisp/vc/vc-git.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index bf1b0503422..88052d7749b 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\"."
1388 (define-key map [git-grep] 1388 (define-key map [git-grep]
1389 '(menu-item "Git grep..." vc-git-grep 1389 '(menu-item "Git grep..." vc-git-grep
1390 :help "Run the `git grep' command")) 1390 :help "Run the `git grep' command"))
1391 (define-key map [git-ds]
1392 '(menu-item "Delete Stash..." vc-git-stash-delete
1393 :help "Delete a stash"))
1391 (define-key map [git-sn] 1394 (define-key map [git-sn]
1392 '(menu-item "Stash a Snapshot" vc-git-stash-snapshot 1395 '(menu-item "Stash a Snapshot" vc-git-stash-snapshot
1393 :help "Stash the current state of the tree and keep the current state")) 1396 :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]."
1518 (vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name) 1521 (vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name)
1519 (vc-resynch-buffer (vc-git-root default-directory) t t)) 1522 (vc-resynch-buffer (vc-git-root default-directory) t t))
1520 1523
1524(defun vc-git-stash-delete (name)
1525 "Delete stash NAME."
1526 (interactive (list (vc-git-stash-read "Delete stash: ")))
1527 (vc-git-command "*vc-git-stash*" 0 nil "stash" "drop" "-q" name)
1528 (vc-resynch-buffer (vc-git-root default-directory) t t))
1529
1521(defun vc-git-stash-snapshot () 1530(defun vc-git-stash-snapshot ()
1522 "Create a stash with the current tree state." 1531 "Create a stash with the current tree state."
1523 (interactive) 1532 (interactive)