Patrick Steinhardt <ps@xxxxxx> writes: > + ref = argv[0]; > + if (!is_root_ref(ref) && check_refname_format(ref, 0)) > + die(_("invalid reference name: %s"), ref); The "root ref" check is new in this iteration, and it makes perfect sense. We are not passing REFNAME_ALLOW_ONELEVEL flag, so we explicitly allow things like HEAD (but exclude things like FETCH_HEAD).