2011-04-03 17:11:53 +09:00

23 lines
321 B
Bash
Executable File

#! /bin/sh
if [ -z "$(git branch)" ]; then
exit 0
fi
if [ -n "${GIT_DIR}" ]; then
hooksdir="./${GIT_DIR}/hooks/"
else
hooksdir="./"
fi
. "${hooksdir}common.sh"
isOnMasterBranch
if [ $? -eq 0 ]; then
echo "can't commit on master branch."
echo "please commit on topic branch."
exit 1
fi
exit 0