vc-git: Ignore errors caused by a non-existent directory in vc-git-registered.
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
40f656cd02
commit
4de0f9f9b6
@ -58,8 +58,9 @@
|
|||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let* ((dir (file-name-directory file))
|
(let* ((dir (file-name-directory file))
|
||||||
(name (file-relative-name file dir)))
|
(name (file-relative-name file dir)))
|
||||||
(when dir (cd dir))
|
(and (ignore-errors
|
||||||
(and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
|
(when dir (cd dir))
|
||||||
|
(eq 0 (call-process "git" nil '(t nil) nil "ls-files" "-c" "-z" "--" name)))
|
||||||
(let ((str (buffer-string)))
|
(let ((str (buffer-string)))
|
||||||
(and (> (length str) (length name))
|
(and (> (length str) (length name))
|
||||||
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))
|
(string= (substring str 0 (1+ (length name))) (concat name "\0"))))))))
|
||||||
|
Reference in New Issue
Block a user