resolve_ref(): verify that the input refname has the right format