#!/bin/bash
rc=0
while read old_sha1 new_sha1 refname
do
    echo "ns: " $new_sha1
    echo "os: " $old_sha1
    echo "red:" $refname
    echo "----"
    email=`git log -1 --format=format:%aE HEAD`
    IFS="`printf '\n\t'`"
    name=`git log  --format=format:%aN $old_sha1..$new_sha1`
    for n in ${name}
    do	
        case ${n} in
           "root") 
	        echo "---------------------------------------------"
      	        echo "---------------------------------------------"
                echo
	        echo "commiting username of root found, fix your client config"
		echo "If you think this is an error, then check your client config again"
                echo
	        echo "---------------------------------------------"
	        echo "---------------------------------------------"
	        rc=1
		break
                ;;

           "mythtv") 
	        echo "---------------------------------------------"
      	        echo "---------------------------------------------"
                echo
	        echo "commiting username of mythtv found, fix your client config"
		echo "If you think this is an error, then check your client config again"
                echo
	        echo "---------------------------------------------"
	        echo "---------------------------------------------"
	        rc=1
		break
                ;;
        esac
    done
done
exit $rc
