From: Andreas Gerler Date: Tue, 11 Aug 2015 16:13:02 +0000 (+0200) Subject: fixed git tag commit hook for magit 2. X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=c13139f591bc8390f722eb748839bb3a26d4dd13;p=emacsconfig.git fixed git tag commit hook for magit 2. - magit-log-edit-mode-hook is gone. git-commit-mode-hook must be used now. --- diff --git a/bba.org b/bba.org index 13fe2fea..8463aef9 100644 --- a/bba.org +++ b/bba.org @@ -176,12 +176,16 @@ For annotated tags prepare message with commit messages since last tag. #+BEGIN_SRC emacs-lisp (require 'magit) (setq magit-last-seen-setup-instructions "1.4.0") - (add-hook 'magit-log-edit-mode-hook - (lambda () - (when (magit-log-edit-get-field 'tag-name) + (add-hook 'git-commit-mode-hook + (lambda() + (when (equal "TAG_EDITMSG" (buffer-name)) (progn - (end-of-buffer) - (insert (shell-command-to-string "git log --pretty=format:\"* %s\" `git rev-list --tags --max-count=1`..HEAD" ))) + (insert (shell-command-to-string "git log --pretty=format:\"* %s\" `git rev-list --tags --max-count=1`..HEAD" )) + (newline) + (beginning-of-buffer) + (newline) + (beginning-of-buffer) + ) ) ) )