|
From: | Konstantin Kharlamov |
Subject: | bug#35368: Acknowledgement ([PATCH] Do potentially destructive operations in prepare-commit-msg) |
Date: | Tue, 23 Apr 2019 14:00:05 +0300 |
On Вт, Apr 23, 2019 at 11:43, Basil L. Contovounesios <contovob@tcd.ie> wrote:
Konstantin Kharlamov <hi-angel@yandex.ru> writes:Oh, and while on it: I'm thinking also about automatically filling the default commit template (i.e. files changed, functions changed — can be inferred for C). I'm wondering, which language would it be acceptable to write hook in? Python?Why not Elisp? IIUC this already exists as add-change-log-entry.
Ok, cool, thanks folks! Yeah, then I'll probably take a look at it.Btw, somewhat related: if anybody interested, I can share a bit of config: as I figured, many projects (not Emacs though) require to start commit message with subsystem they changed, which is often the last directory name. So some hours ago I made up a global prepare-commit-msg hook that automatically inserts name of the directory https://github.com/Hi-Angel/dotfiles/blob/master/.git_hooks/prepare-commit-msg (initially I wrote it in sh, but code was too awkward, so I rewrote it in Python). To make it work globally write in `core` section of ~/.gitconfig the `hooksPath = "~/.git_hooks`
[Prev in Thread] | Current Thread | [Next in Thread] |