diff options
| author | Zaran <zaran.krleza@gmail.com> | 2011-09-21 01:34:23 +0200 |
|---|---|---|
| committer | Zaran <zaran.krleza@gmail.com> | 2011-09-21 01:34:23 +0200 |
| commit | c607a0177e6950e098d0f655dc4b8d6008d50710 (patch) | |
| tree | 6926a1a3c770c5384293538abaa26b971ee5ad07 /misc/post-receive | |
| parent | 4264d6c6360c234d789df2ea513bb83022f41ab3 (diff) | |
| download | alias-c607a0177e6950e098d0f655dc4b8d6008d50710.tar.gz | |
Improve irc notification to support multiple commits.
post-recieve hooks print all the commit lines to standard output
which is piped to git-post-commit.py. git-post-commit.py now reads
on standard input, one line at a time and prints in the channel.
Diffstat (limited to 'misc/post-receive')
| -rwxr-xr-x | misc/post-receive | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/misc/post-receive b/misc/post-receive index 09ccf95..b44916a 100755 --- a/misc/post-receive +++ b/misc/post-receive @@ -5,6 +5,11 @@ # irc notification # change the path of the python script -read oldrev newrev refname -a=`git log --format=format:"%an | %s" $oldrev..$newrev` -python git-post-commit.py "irc.freenode.net" "AliasCommit" "#alias" "$a" +{ + while read oldrev newrev refname + do + a=`git log --format=format:"%an | %s" $oldrev..$newrev` + printf "$a\n" + done +} | python git-post-commit.py "irc.freenode.net" "AliasCommit" "#alias" + |
