Re: What about allowing multiple hooks?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin wrote:
So, the thing I initially wanted to solve was "multiple instances" of the same hook.

And why not use a shell function for that?

-- snip --
buildbot () {
	echo "Who is so evil and puts a bot into a post-receive hook?" >&2
	echo "This function would connect to $* if it were building a bot."
}

buildbot www.google.com
buildbot www.kernel.org
-- snap --

That is basically what I started with except that it looked like this:

-- 8< --
#!/bin/sh
/opt/git-triggers/buildbot-sendchange.py 192.168.9.99:9989
/opt/git-triggers/buildbot-sendchange.py 192.168.9.99:9988
/opt/git-triggers/send-mail
/opt/git-triggers/irc-notification
-- 8< --

At that point it thought "hey this looks like a configuration file, shouldn't a repository's config live in $GIT_DIR/config?".


We will continue use this config based approach on our site[*] until git has something better. For us it wins over shellscript-as-configuration for two reasons: 1) git config is easier to script 2) it allows us to define site wide triggers in /etc/gitconfig

[*] (our site is medium sized I guess, ~100 repos when all are converted to git)

 anders
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux