Skip to content

Commit 7182768

Browse files
committed
Check that file exists before trying to get attributes
1 parent c030786 commit 7182768

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-attr.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
(let ((file buffer-file-name)
4848
(git (executable-find "git")))
4949
(when (and file
50-
git)
50+
git
51+
(file-exists-p file))
5152
(let ((attr-list (split-string (with-output-to-string
5253
(with-current-buffer standard-output
5354
(call-process git nil (list t nil) nil "check-attr" "-z" "-a" file)

0 commit comments

Comments
 (0)