Remove the custom variable magit-commit-signoff in favor of a function magit-commit-signoff-p which reads format.sifoff from the config
Signed-off-by: Ramkumar Ramachandra <[email protected]> --- magit.el | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/magit.el b/magit.el index 59430cd..43d333b 100644 --- a/magit.el +++ b/magit.el @@ -106,11 +106,6 @@ Setting this to nil will make it do nothing, setting it to t will arrange things (const :tag "Ask" ask) (const :tag "Ask to stage everything" ask-stage))) -(defcustom magit-commit-signoff nil - "When performing git commit adds --signoff." - :group 'magit - :type 'boolean) - (defcustom magit-log-cutoff-length 100 "The maximum number of commits to show in the log and whazzup buffers." :group 'magit @@ -448,6 +443,11 @@ Many Magit faces inherit from this one by default." (concat "--pretty=format:" format) commit)) +(defun magit-commit-signoff-p () + (if (equal (magit-get "format" "signoff") "true") + t + nil)) + (defun magit-current-line () (buffer-substring-no-properties (line-beginning-position) (line-end-position))) @@ -2863,7 +2863,7 @@ Prefix arg means justify as well." (sign-off-field (assq 'sign-off fields)) (sign-off (if sign-off-field (equal (cdr sign-off-field) "yes") - magit-commit-signoff)) + (magit-commit-signoff-p))) (tag (cdr (assq 'tag fields))) (author (cdr (assq 'author fields)))) (magit-log-edit-push-to-comment-ring (buffer-string)) @@ -2920,7 +2920,7 @@ Prefix arg means justify as well." (cell (assq 'sign-off fields))) (if cell (rplacd cell (if (equal (cdr cell) "yes") "no" "yes")) - (setq fields (acons 'sign-off (if magit-commit-signoff "no" "yes") + (setq fields (acons 'sign-off (if (magit-commit-signoff-p) "no" "yes") fields))) (magit-log-edit-set-fields fields))) -- 1.7.0.3 -- To unsubscribe, reply using "remove me" as the subject.
