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:
parent
3697c5f37a
commit
6df023884b
@ -1353,7 +1353,7 @@ Commands:
|
|||||||
"Update the corresponding git-status buffer when a file is saved.
|
"Update the corresponding git-status buffer when a file is saved.
|
||||||
Meant to be used in `after-save-hook'."
|
Meant to be used in `after-save-hook'."
|
||||||
(let* ((file (expand-file-name buffer-file-name))
|
(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))))
|
(buffer (and dir (git-find-status-buffer dir))))
|
||||||
(when buffer
|
(when buffer
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user