emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 513fe25 2/2: Call vc-dir-defresh after stash operat


From: Dmitry Gutov
Subject: [Emacs-diffs] master 513fe25 2/2: Call vc-dir-defresh after stash operations
Date: Tue, 20 Oct 2015 19:07:59 +0000

branch: master
commit 513fe25a501b41f9f2aac67f73c8e8730aed81b0
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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).
---
 lisp/vc/vc-dir.el |    2 +-
 lisp/vc/vc-git.el |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index eb03a8b..9b15e64 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -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.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 2a8cd56..0e33896 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -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 "address@hidden" (vc-git-stash-get-at-point 
(point)))))
+  (let (vc-dir-buffers) ; Small optimization.
+    (vc-git-stash-apply (format "address@hidden" (vc-git-stash-get-at-point 
(point)))))
+  (vc-dir-refresh))
 
 (defun vc-git-stash-pop-at-point ()
   (interactive)
-  (vc-git-stash-pop (format "address@hidden" (vc-git-stash-get-at-point 
(point)))))
+  (let (vc-dir-buffers) ; Likewise.
+    (vc-git-stash-pop (format "address@hidden" (vc-git-stash-get-at-point 
(point)))))
+  (vc-dir-refresh))
 
 (defun vc-git-stash-menu (e)
   (interactive "e")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]