Ignore:
Timestamp:
Oct 12, 2009, 2:16:28 AM (15 years ago)
Author:
broder
Message:

Since the zephyr-post-receive is only being used in the submodule,
there's no need to mess around with symlinks.

Location:
trunk/scripts/git-hooks
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/git-hooks/sub/zephyr-post-receive

    • Property svn:special deleted
    • Property svn:executable set to *
    r2324 r2501  
    1 link ../zephyr-post-receive
     1#!/bin/sh
     2#
     3# This script is run after receive-pack has accepted a pack and the
     4# repository has been updated.  It is passed arguments in through stdin
     5# in the form
     6#  <oldrev> <newrev> <refname>
     7# For example:
     8#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
     9
     10class=`git config zephyr.class`
     11instance=`git config zephyr.instance`
     12zsig=`git config zephyr.zsig`
     13color=`git config --bool zephyr.color`
     14
     15if [ "${color:-true}" = "true" ]; then
     16    usecolor="--color"
     17else
     18    usecolor=""
     19fi
     20
     21if [ -z "$class" ]; then
     22  echo "I don't know where to send a commit zephyr!" >&2
     23  echo "Please set the zephyr.class config variable in" >&2
     24  echo "$PWD/config." >&2
     25  exit 1
     26fi
     27while read oldrev newrev refname; do
     28  git-rev-list --reverse "$oldrev..$newrev" | while read rev; do
     29    shortrev=`git log -1 --pretty=format:%h "$rev"`
     30    (git show --stat $usecolor "$rev" |
     31     sed -e 's/@/@@/g' \
     32         -e 's/}/@(})/g' \
     33         -e 's/\[m/}@{/g' \
     34         -e 's/\[33m/@color(yellow)/g' \
     35         -e 's/\[31m/@color(red)/g' \
     36         -e 's/\[32m/@color(green)/g' \
     37         -e '1s/^/@{/' \
     38         -e '$s/$/}/') |
     39    zwrite -c "$class" -i "${instance:-$shortrev}" -s "${zsig:-Git}: $refname" -d
     40  done
     41done
Note: See TracChangeset for help on using the changeset viewer.