Mercurial > emacs
diff lisp/vc-git.el @ 93382:8e46096e0cb3
* 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.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 29 Mar 2008 05:34:52 +0000 |
parents | 53eee5c271f4 |
children | 912e50ecb992 |
line wrap: on
line diff
--- a/lisp/vc-git.el Sat Mar 29 05:33:06 2008 +0000 +++ b/lisp/vc-git.el Sat Mar 29 05:34:52 2008 +0000 @@ -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