]> git.eshelyaron.com Git - emacs.git/commitdiff
Call vc-dir-defresh after stash operations
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 20 Oct 2015 17:04:47 +0000 (20:04 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 20 Oct 2015 19:07:20 +0000 (22:07 +0300)
* 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).

lisp/vc/vc-dir.el
lisp/vc/vc-git.el

index eb03a8b45a7207eb498a2e1dfae106325e75bc51..9b15e64fad7cfb722c85815c9890e6724a007322 100644 (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.
index 2a8cd568bf7d60cdeb01582f9f7f7eb1a86e2fe2..0e33896a7158de798f743ca7390871397dd9e467 100644 (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")