From 1aa5062f1e4dcacfe458693e85ca93eb80f63648 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 12 Oct 2009 02:16:30 -0400 Subject: [PATCH] Update the zephyr-post-receive hook from the snippets locker. svn path=/trunk/scripts/git-hooks/; revision=2502 --- sub/zephyr-post-receive | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sub/zephyr-post-receive b/sub/zephyr-post-receive index 7e06b30..0dfa83b 100755 --- a/sub/zephyr-post-receive +++ b/sub/zephyr-post-receive @@ -25,9 +25,15 @@ if [ -z "$class" ]; then exit 1 fi while read oldrev newrev refname; do - git-rev-list --reverse "$oldrev..$newrev" | while read rev; do + if [ "$oldrev" = "0000000000000000000000000000000000000000" ]; then + # dammit git + zwrite -c "$class" -i "$(basename "$refname")" -s "${zsig:-Git}: $refname" -d \ + -m "New branch created." + continue + fi + git rev-list --first-parent --reverse "$oldrev..$newrev" | while read rev; do shortrev=`git log -1 --pretty=format:%h "$rev"` - (git show --stat $usecolor "$rev" | + (git show --stat -M $usecolor "$rev" | sed -e 's/@/@@/g' \ -e 's/}/@(})/g' \ -e 's/\[m/}@{/g' \ -- 1.7.9.5