Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions git-emacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,8 @@ commit, like git commit --amend will do once we commit."
"# Date : " (git--today) "\n")))

;; Internal variables for commit
(defvar git--commit-before-hook nil
"Hooks to run before comitting the commit buffer.")
(defvar git--commit-after-hook nil
"Hooks to run after comitting (and killing) the commit buffer.")
(defvar git--commit-args nil
Expand All @@ -1225,6 +1227,9 @@ Trim the buffer log, commit runs any after-commit functions."
git--commit-log-buffer)
(error "Execute git commit on %s buffer" git--commit-log-buffer))

;; hooks (e.g. code check)
(run-hooks 'git--commit-before-hook)

;; trail and commit
(save-excursion
(goto-char (point-min))
Expand Down