aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Meulien2018-09-04 22:50:56 +0200
committerDmitry Gutov2018-12-11 01:17:52 +0200
commit0249277925c216d06dfe584bb72c3b03078de74b (patch)
tree25129a2256a1eb216d6a7a722af3fe8550ed6dcb
parentc8431a06e4f2209f1c5ba30e2d6a70f284dc4678 (diff)
downloademacs-0249277925c216d06dfe584bb72c3b03078de74b.tar.gz
emacs-0249277925c216d06dfe584bb72c3b03078de74b.zip
Support git commit --no-verify
* lisp/vc/vc-git.el (vc-git-log-edit-toggle-no-verify): New function. (vc-git-log-edit-mode-map): Add binding. (vc-git-checkin): Add an entry for that header.
-rw-r--r--lisp/vc/vc-git.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f3174005307..aa6809f626e 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -757,6 +757,11 @@ the commit message."
757 (interactive) 757 (interactive)
758 (log-edit-toggle-header "Sign-Off" "yes")) 758 (log-edit-toggle-header "Sign-Off" "yes"))
759 759
760(defun vc-git-log-edit-toggle-no-verify ()
761 "Toggle whether to bypass the pre-commit and commit-msg hooks."
762 (interactive)
763 (log-edit-toggle-header "No-Verify" "yes"))
764
760(defun vc-git-log-edit-toggle-amend () 765(defun vc-git-log-edit-toggle-amend ()
761 "Toggle whether this will amend the previous commit. 766 "Toggle whether this will amend the previous commit.
762If toggling on, also insert its message into the buffer." 767If toggling on, also insert its message into the buffer."
@@ -782,6 +787,7 @@ If toggling on, also insert its message into the buffer."
782(defvar vc-git-log-edit-mode-map 787(defvar vc-git-log-edit-mode-map
783 (let ((map (make-sparse-keymap "Git-Log-Edit"))) 788 (let ((map (make-sparse-keymap "Git-Log-Edit")))
784 (define-key map "\C-c\C-s" 'vc-git-log-edit-toggle-signoff) 789 (define-key map "\C-c\C-s" 'vc-git-log-edit-toggle-signoff)
790 (define-key map "\C-c\C-n" 'vc-git-log-edit-toggle-no-verify)
785 (define-key map "\C-c\C-e" 'vc-git-log-edit-toggle-amend) 791 (define-key map "\C-c\C-e" 'vc-git-log-edit-toggle-amend)
786 map)) 792 map))
787 793
@@ -825,6 +831,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
825 `(("Author" . "--author") 831 `(("Author" . "--author")
826 ("Date" . "--date") 832 ("Date" . "--date")
827 ("Amend" . ,(boolean-arg-fn "--amend")) 833 ("Amend" . ,(boolean-arg-fn "--amend"))
834 ("No-Verify" . ,(boolean-arg-fn "--no-verify"))
828 ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) 835 ("Sign-Off" . ,(boolean-arg-fn "--signoff")))
829 comment))) 836 comment)))
830 (when msg-file 837 (when msg-file