X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/blobdiff_plain/fc9ab391a52dce801a9aa3568400d10b584b0eda..d0ef17b3aae0b08bdc68a339f9a916493aaf6e00:/git-hooks/zephyr-post-receive diff --git a/git-hooks/zephyr-post-receive b/git-hooks/zephyr-post-receive index 7e06b30..e7b70d9 100755 --- a/git-hooks/zephyr-post-receive +++ b/git-hooks/zephyr-post-receive @@ -25,6 +25,12 @@ if [ -z "$class" ]; then exit 1 fi while read oldrev newrev refname; 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 --reverse "$oldrev..$newrev" | while read rev; do shortrev=`git log -1 --pretty=format:%h "$rev"` (git show --stat $usecolor "$rev" |