-#!/bin/sh
+#!/bin/bash
#
# This is a generic update hook script for GIT repositories.
+# Written by Martin Mares <mj@ucw.cz> based on the template from GIT distribution.
#
# Called by git-receive-pack with arguments: refname sha1-old sha1-new
#
-# Expects the following environment variables:
+# Expects the following environment variables to be set:
#
# recipient where to send the mail reports to
# sub_prefix prefix which should be prepended to mail subject
out=`mktemp -t gitlog.XXXXXXX`
if [ $branch == master ] ; then
- subj="$sub_prefix"
+ subj="[$sub_prefix]"
else
subj="[$sub_prefix:$branch]"
fi