refs: pass NULL to refs_resolve_ref_unsafe() if hash is not needed