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

Feature request: Specify hooks on the command line

From
SBStuart P. Bentley <stuart@testtrack4.com>
Date
Jul 17, 2014, 23:54 UTC
Message-ID
<lq9no7$675$1@ger.gmane.org>

I'm developing a project called [Plushu][], an ecosystem for creating plugin-based dedicated user shells, patterned after [Dokku][] (and similar to git-shell).

[Plushu]: https://github.com/plushu/plushu [Dokku]: https://github.com/progrium/dokku

Plushu has its own hook system for plugins (so multiple plugins can listen on a single hook). Right now, to extend Git's hooks to Plushu's plugins, Plushu's plugin for Git links the "$GIT_DIR/hooks" directory for all new repositories to a directory with scripts that delegate to Plushu's hook system.

I'd rather not have to alter the repository directories to create this interface, so it would be a significant improvement if Git provided some mechanism to specify hooks on the command line. I was thinking something like a GIT_HOOKS_DIR environment variable, or perhaps a "--hooks update=/opt/hook"-style option.

(Perhaps, as a more general solution, there should be a way of specifying alternatives for individual GIT_DIR subdirectories per-command?)

I'm willing to draft the patch for this if someone could point me to the relevant spot(s) in the code.

Message 1 of 1 in “Feature request: Specify hooks on the command line”
  1. Stuart P. BentleyJul 17, 2014

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.