@matheusbsbs / matheus-bagliano / commits / a944652c05
Fork 0

git.el: Set default directory before running the status mode setup hooks.

Also set the list-buffers-directory variable for nicer buffer list display. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Alexandre Julliard committed Mar 4, 2006 at 17:38 UTC a944652c054464ab3a70cead89df170602339512
1 file changed +2 -1
contrib/emacs/git.el
+2 -1
@@ -943,6 +943,7 @@ Commands:
943 (erase-buffer)
944 (let ((status (ewoc-create 'git-fileinfo-prettyprint "" "")))
945 (set (make-local-variable 'git-status) status))
946 + (set (make-local-variable 'list-buffers-directory) default-directory)
947 (run-hooks 'git-status-mode-hook)))
948
949 (defun git-status (dir)
@@ -952,8 +953,8 @@ Commands:
953 (if (file-directory-p (concat (file-name-as-directory dir) ".git"))
954 (let ((buffer (create-file-buffer (expand-file-name "*git-status*" dir))))
955 (switch-to-buffer buffer)
955 - (git-status-mode)
956 (cd dir)
957 + (git-status-mode)
958 (git-refresh-status)
959 (goto-char (point-min)))
960 (message "%s is not a git working tree." dir)))