All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Waldenborg <anders@0x63.nu>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Alexander Potashev <aspotashev@gmail.com>,
	Marc Weber <marco-oweber@gmx.de>,
	Rogan Dawes <lists@dawes.za.net>,
	martin f krafft <madduck@madduck.net>
Subject: Re: What about allowing multiple hooks?
Date: Thu, 22 Jan 2009 10:57:02 +0100	[thread overview]
Message-ID: <497842EE.8000400@0x63.nu> (raw)
In-Reply-To: <alpine.DEB.1.00.0901212247510.3586@pacific.mpi-cbg.de>

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

      reply	other threads:[~2009-01-22  9:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 13:38 What about allowing multiple hooks? Marc Weber
2008-11-21 13:55 ` martin f krafft
2008-11-21 14:56 ` Rogan Dawes
2009-01-03 23:32 ` Alexander Potashev
2009-01-04 10:01   ` Junio C Hamano
2009-01-21 20:35     ` Anders Waldenborg
2009-01-21 21:10       ` Johannes Schindelin
2009-01-21 21:30         ` Anders Waldenborg
2009-01-21 21:50           ` Johannes Schindelin
2009-01-22  9:57             ` Anders Waldenborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497842EE.8000400@0x63.nu \
    --to=anders@0x63.nu \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=aspotashev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lists@dawes.za.net \
    --cc=madduck@madduck.net \
    --cc=marco-oweber@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.