customer_281/.githooks/post-checkout

11 lines
347 B
Plaintext
Executable File

echo "POST-CHECKOUT"
echo "PREV-HEAD=$1"
echo "CURR-HEAD=$2"
echo "BRANCH-CHECKOUT=$3"
if [ -f /opt/app/tools/atbupdate/checkout_history ]; then
readonly repo=i$(basename $(git rev-parse --show-toplevel))
readonly branch=$(git log --graph --all --decorate $2 | head -n 1 | sed -E -e 's/(.*?)(\(.*\))/\2/g')
echo "$repo:$branch"
fi