{"thread":{"id":"37154","subject":"Feature request: Specify hooks on the command line","startedAt":"2014-07-17T23:54:41Z","lastAt":"2014-07-17T23:54:41Z","messageCount":1,"participants":["Stuart P. Bentley"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"246281","messageId":"lq9no7$675$1@ger.gmane.org","threadId":"37154","inReplyTo":null,"subject":"Feature request: Specify hooks on the command line","fromName":"Stuart P. Bentley","fromEmail":"stuart@testtrack4.com","sentAt":"2014-07-17T23:54:41Z","receivedAt":"2014-07-17T23:54:41Z","isPatch":false,"sender":{"key":"stuart@testtrack4.com","avatar":null},"body":"I'm developing a project called [Plushu][], an ecosystem for creating \nplugin-based dedicated user shells, patterned after [Dokku][] (and \nsimilar to git-shell).\n\n[Plushu]: https://github.com/plushu/plushu\n[Dokku]: https://github.com/progrium/dokku\n\nPlushu has its own hook system for plugins (so multiple plugins can \nlisten on a single hook). Right now, to extend Git's hooks to Plushu's \nplugins, Plushu's plugin for Git links the \"$GIT_DIR/hooks\" directory \nfor all new repositories to a directory with scripts that delegate to \nPlushu's hook system.\n\nI'd rather not have to alter the repository directories to create this \ninterface, so it would be a significant improvement if Git provided some \nmechanism to specify hooks on the command line. I was thinking something \nlike a GIT_HOOKS_DIR environment variable, or perhaps a \"--hooks \nupdate=/opt/hook\"-style option.\n\n(Perhaps, as a more general solution, there should be a way of \nspecifying alternatives for individual GIT_DIR subdirectories per-command?)\n\nI'm willing to draft the patch for this if someone could point me to the \nrelevant spot(s) in the code.\n"}]}