Set magit commit to use --gpg-sign when possible

If imalison:gpg-key is set to a non-nil value it is added to
magit-commit-arguments which makes it a default option.
This commit is contained in:
Ivan Malison 2016-06-20 01:22:43 -07:00
parent afcd5804c0
commit 1142e687e5

View File

@ -843,6 +843,8 @@ This interactive functions allows the user the select a function to invoke using
#+BEGIN_SRC emacs-lisp
(defvar imalison:projects-directory
(imalison:join-paths "~" "Projects"))
(defvar imalison:gpc-key)
#+END_SRC
* Macros
** For editing literate config
@ -1752,6 +1754,9 @@ I use helm for almost all emacs completion
(progn
(defvar-setq magit-last-seen-setup-instructions "1.4.0")
(magit-auto-revert-mode)
(when imalison:gpg-key
(add-to-list 'magit-commit-arguments
(format "--gpg-sign=%s" imalison:gpg-key)))
(use-package magit-filenotify
;; Seems like OSX does not support filenotify.
:disabled t