diff --git a/.githooks/post-checkout b/.githooks/post-checkout index ed8d9bc..f4c4a7e 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -8,7 +8,7 @@ readonly update_log_file="/opt/app/tools/atbupdate/update_log.csv" if [ -f $ch_file ]; then readonly repo=$(basename $(git rev-parse --show-toplevel)) - readonly branch=$(git log --graph --all --decorate $2 | head -n 1 | sed -E -e 's/(.*?)(\(.*\))/\2/g') + readonly branch=$(git log --graph --all --decorate $2 | head -n 1 | sed -E -e 's/(.*?)\((.*)\)/\2/g' | sed -E -e s/[[:space:]]//g) line="$repo:$branch" echo "line=$line" if ! grep -Eq "$line" $ch_file; then