Don't compare hashes when bare repo is empty
When we push to an empty repo, the hooks receive an all-zero FROM_REV as argument.
It somehow goes through with the push (probably because the subexpression ends up returning no stdout - see below) but it still spits out an error-looking thing besides being very confusing and fragile to refactor.
machine # remote: + FROM_REV=0000000000000000000000000000000000000000
machine # remote: + shift
machine # remote: + TO_REV=c29ab62e1873bf55a4df507b027c22ec384bd228
machine # remote: + shift
machine # remote: + '[' refs/heads/master '!=' refs/heads/master ']'
machine # remote: ++ git rev-list c29ab62e1873bf55a4df507b027c22ec384bd228..0000000000000000000000000000000000000000
machine # remote: ++ head -c1
machine # remote: ++ wc -c
machine # remote: fatal: Invalid revision range c29ab62e1873bf55a4df507b027c22ec384bd228..0000000000000000000000000000000000000000
machine # remote: + '[' 0 -ne 0 ']'
$ if [ "$(git rev-list 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 | wc -c)" -ne 0 ]; then echo "T"; else echo "F"; fi;
fatal: Invalid revision range 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
F