Skip to content

Commit 7f687bf

Browse files
authored
Merge pull request #3 from xendk/file-exists-p
Check that file exists before trying to get attributes
2 parents c030786 + 7182768 commit 7f687bf

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)