git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Running interpret-trailers automatically on each commit?

From
JMJeremy Morton <admin@game-point.net>
Date
Aug 28, 2015, 15:22 UTC
Message-ID
<55E07CB1.0@game-point.net>
I see that interpret-trailers has been added by default in git 2.5.0. 
  However the documentation isn't that great and I can't tell whether 
it gets run automatically when I do a "git commit".  My guess is that 
it doesn't - that you have to set up a hook to get it to run each commit.

As far as I can tell, there is no way to configure global git hooks. Sure, you can set init.templatedir but that only applies for newly-init'ed or cloned repos. So if I have 50 repos on my hard drive I still have to go through every one of them and set up a hook for it.

Basically, am I right in thinking that there is *still* no way for me to configure git (on a global, not per-repo basis) to automatically tack a trailer onto every commit message? For the record, I want that trailer to be the current branch name.

-- 
Best regards,
Jeremy Morton (Jez)
Next: Junio C Hamano
Message 1 of 6 in “Running interpret-trailers automatically on each commit?”
  1. Jeremy MortonAug 28, 2015
  2. Junio C HamanoAug 28, 2015
  3. Jeremy MortonAug 28, 2015
  4. Matthieu MoyAug 31, 2015
  5. Junio C HamanoAug 31, 2015
  6. Junio C HamanoAug 31, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.