git.el: Fix typo in git-update-saved-file error handling.

Spotted by Matthieu Lemerre.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Alexandre Julliard 2007-10-28 11:05:45 +01:00 committed by Junio C Hamano
parent 3697c5f37a
commit 6df023884b

View File

@ -1353,7 +1353,7 @@ Commands:
"Update the corresponding git-status buffer when a file is saved.
Meant to be used in `after-save-hook'."
(let* ((file (expand-file-name buffer-file-name))
(dir (condition-case nil (git-get-top-dir (file-name-directory file))))
(dir (condition-case nil (git-get-top-dir (file-name-directory file)) (error nil)))
(buffer (and dir (git-find-status-buffer dir))))
(when buffer
(with-current-buffer buffer