update-ref --stdin: improve the error message for unexpected EOF