1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00

Call vc-dir-defresh after stash operations

* lisp/vc/vc-git.el (vc-git-stash-apply-at-point)
(vc-git-stash-pop-at-point): Call vc-dir-defresh (bug#13960).

* lisp/vc/vc-dir.el (vc-dir-resynch-file): Expand FNAME as well,
since it can be abbreviated (as returned by vc-find-root).
This commit is contained in:
Dmitry Gutov 2015-10-20 20:04:47 +03:00
parent 5e4395544c
commit 513fe25a50
2 changed files with 7 additions and 3 deletions

View file

@ -932,7 +932,7 @@ If it is a file, return the corresponding cons for the file itself."
(defun vc-dir-resynch-file (&optional fname)
"Update the entries for FNAME in any directory buffers that list it."
(let ((file (or fname (expand-file-name buffer-file-name)))
(let ((file (expand-file-name (or fname buffer-file-name)))
(drop '()))
(save-current-buffer
;; look for a vc-dir buffer that might show this file.

View file

@ -1362,11 +1362,15 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
(defun vc-git-stash-apply-at-point ()
(interactive)
(vc-git-stash-apply (format "stash@%s" (vc-git-stash-get-at-point (point)))))
(let (vc-dir-buffers) ; Small optimization.
(vc-git-stash-apply (format "stash@%s" (vc-git-stash-get-at-point (point)))))
(vc-dir-refresh))
(defun vc-git-stash-pop-at-point ()
(interactive)
(vc-git-stash-pop (format "stash@%s" (vc-git-stash-get-at-point (point)))))
(let (vc-dir-buffers) ; Likewise.
(vc-git-stash-pop (format "stash@%s" (vc-git-stash-get-at-point (point)))))
(vc-dir-refresh))
(defun vc-git-stash-menu (e)
(interactive "e")