xargs -r: Only run cmd if there is input

Otherwise we got a failing "git update-ref -d"
command if "git for-each-ref" does not output anything.