3 while read oldrev newrev refname ; do
4 if [ "$refname" == "refs/heads/gitconfig" ] ; then
5 config_hash=$(git ls-tree $newrev | grep config | grep -oP '\w{40}')
6 if [[ "$config_hash" != "" ]] ; then
7 git cat-file blob "$config_hash" | while read line ; do
10 git config "${key}" "${value}"
14 hooks_hash=$(git ls-tree $newrev | grep hooks | grep -oP '\w{40}')
15 if [[ "$hooks_hash" != "" ]] ; then
16 git ls-tree "$hooks_hash" | while read mode type file_hash file_name ; do
17 echo "Installing $file_name"
18 git cat-file blob "$file_hash" > "hooks/$file_name"