Merge pull request #4748 from nbfalcon/bugfix-security/git-commit-locals-predicates

`git-commit`: fix variable predicates
This commit is contained in:
Henrik Lissner 2021-03-07 12:33:44 -05:00 committed by GitHub
commit 1c9184504a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,8 +9,11 @@
(setenv "GIT_ASKPASS" "git-gui--askpass")) (setenv "GIT_ASKPASS" "git-gui--askpass"))
;; Don't complain when these variables are set in file/local vars ;; Don't complain when these variables are set in file/local vars
(put 'git-commit-major-mode 'safe-local-variable 'symbolp) (put 'git-commit-major-mode 'safe-local-variable
(put 'git-commit-summary-max-length 'safe-local-variable 'symbolp) (lambda (x)
(memq x '(git-commit-elisp-text-mode
text-mode fundamental-mode org-mode markdown-mode))))
(put 'git-commit-summary-max-length 'safe-local-variable 'numberp)
;; In case the user is using `bug-reference-mode' ;; In case the user is using `bug-reference-mode'
(map! :when (fboundp 'bug-reference-mode) (map! :when (fboundp 'bug-reference-mode)