GNU bug report logs -
#35368
[PATCH] Do potentially destructive operations in prepare-commit-msg
Previous Next
Full log
View this message in rfc822 format
On Вт, Apr 23, 2019 at 11:43, Basil L. Contovounesios
<contovob <at> tcd.ie> wrote:
> Konstantin Kharlamov <hi-angel <at> 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`
This bug report was last modified 6 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.