mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* vc.el (vc-status-menu-map, vc-status-mode-map): Bind vc-revert.
(vc-status-refresh): Create a temporary buffer and call the `dir-status' backend function from that buffer. * vc-bzr.el (vc-bzr-dir-status): Don't create a buffer. (vc-bzr-after-dir-status): Don't kill the buffer. * vc-cvs.el (vc-cvs-dir-status): Don't create a buffer. (vc-cvs-after-dir-status): Don't kill the buffer. * vc-git.el (vc-git-dir-status): Don't create a buffer. (vc-git-after-dir-status-stage2): Don't kill the buffer. * vc-hg.el (vc-hg-dir-status): Don't create a buffer. (vc-hg-after-dir-status): Don't kill the buffer. * vc-svn.el (vc-svn-dir-status): Don't create a buffer. (vc-svn-after-dir-status): Don't kill the buffer.
This commit is contained in:
parent
f3d57a2c20
commit
115c006177
7 changed files with 85 additions and 83 deletions
|
|
@ -215,9 +215,7 @@
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\([^\0]*?\\)\0" nil t 1)
|
||||
(push (cons (match-string 1) 'unregistered) vc-git-status-result))
|
||||
(funcall update-function (nreverse vc-git-status-result) status-buffer)
|
||||
;; Remove the temporary buffer.
|
||||
(kill-buffer (current-buffer)))
|
||||
(funcall update-function (nreverse vc-git-status-result) status-buffer))
|
||||
|
||||
(defun vc-git-after-dir-status-stage1 (update-function status-buffer)
|
||||
(goto-char (point-min))
|
||||
|
|
@ -248,21 +246,16 @@
|
|||
;; Further things that would have to be fixed later:
|
||||
;; - how to handle unregistered directories
|
||||
;; - how to support vc-status on a subdir of the project tree
|
||||
(with-current-buffer
|
||||
(get-buffer-create
|
||||
(expand-file-name " *VC-Git* tmp status" dir))
|
||||
(set (make-local-variable 'vc-git-status-result) nil)
|
||||
(cd dir)
|
||||
(erase-buffer)
|
||||
(if (vc-git--empty-db-p)
|
||||
(progn
|
||||
(vc-git-command (current-buffer) 'async nil "ls-files" "-z" "-c")
|
||||
(vc-exec-after
|
||||
`(vc-git-after-dir-status-stage1-empty-db (quote ,update-function) ,status-buffer)))
|
||||
(vc-git-command (current-buffer) 'async nil "diff-index" "-z" "HEAD")
|
||||
(vc-exec-after
|
||||
`(vc-git-after-dir-status-stage1 (quote ,update-function) ,status-buffer)))
|
||||
(current-buffer)))
|
||||
(set (make-local-variable 'vc-git-status-result) nil)
|
||||
(if (vc-git--empty-db-p)
|
||||
(progn
|
||||
(vc-git-command (current-buffer) 'async nil "ls-files" "-z" "-c")
|
||||
(vc-exec-after
|
||||
`(vc-git-after-dir-status-stage1-empty-db
|
||||
(quote ,update-function) ,status-buffer)))
|
||||
(vc-git-command (current-buffer) 'async nil "diff-index" "-z" "HEAD")
|
||||
(vc-exec-after
|
||||
`(vc-git-after-dir-status-stage1 (quote ,update-function) ,status-buffer))))
|
||||
|
||||
(defun vc-git-status-extra-headers (dir)
|
||||
(let ((str (with-output-to-string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue