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

Thoughts on adding another hook to git

From
David Kowis <dkowis@shlrm.org>
Date
Jun 12, 2006, 18:27 UTC
Message-ID
<448DB201.5090208@shlrm.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I'd like to be able to modify the commit message before it ends up in the $EDITOR. This is a fairly trivial thing to implement: Call ${GIT_DIR}/hooks/pre-editor on COMMIT_MESSAGE before opening it in $EDITOR.

My question to you all is should I set it up so that the hook only opens when the $EDITOR is actually being called? (really easy) Or, do I set it up so that the hook always happens. In which case it's similar to the commit-msg hook already, just happens before the message instead of after.

Thanks,
- --
David Kowis

ISO Team Lead - www.sourcemage.org Source Mage GNU/Linux

Progress isn't made by early risers. It's made by lazy men trying to
find easier ways to do something.
  - Robert Heinlein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iQGVAwUBRI2yAMnf+vRw63ObAQpNSgv+OCXYSDlW96K9M5QZvSaEbdZOGorYZg5Y RSh9WUXS2ribYRr1TbplD0Fp4vGnG8CB6qvr2QF8vP3tbEMjnwk4LobeWaUtK2Kn Hja3TgIUPWkzHMLleToe5o99r8v/6LFf9rkBxvFw3TMkuxsFS/lFlxy1eRa43rvd Skod2cA7RWus1IFJcbDKNonjhJkVkHylSMjT8iVQDbgY0hg7PEy2ZW3XB0MJJRZC lLsDDIJ4msPCXSx/lDRGaJj+m7IrvUgnEDzkX0jTT8DeZqnlC8nRM/2dOS72b/5w gIBYu49DvTL8ynod2mmYTyBynfRpVxPjxnXbubn/M+N+0WCTXIUTPCbyW2MOscjA pFe6/S1qKaTqc06VBDabYxdvGrHG6v+KkaJhu2XoLOHWVoBblobBBNrpIkA6GNqz H7JHNJDF+JbshlW2aU2HazDINRfD/AfrJmDx4Xn91qAKiegyO3wRA1rM6a0LEpun zg3haF3l0rfBEdFpz21gNQbYxNHaRkwg =Rxm/ -----END PGP SIGNATURE-----

Next: Yakov Lerner
Message 1 of 9 in “Thoughts on adding another hook to git”
  1. David KowisJun 12, 2006
  2. Yakov LernerJun 12, 2006
  3. David KowisJun 12, 2006
  4. Yakov LernerJun 12, 2006
  5. David KowisJun 12, 2006
  6. Nikolai WeibullJun 13, 2006
  7. David KowisJun 13, 2006
  8. Nikolai WeibullJun 13, 2006
  9. Junio C HamanoJun 13, 2006

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.