Re: [PATCH v3 4/9] builtin/reflog: implement subcommand to write new entries
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2025, 16:07 UTC
- Message-ID
- <xmqqtt2vou90.fsf@gitster.g>
- In-Reply-To
- <20250729-pks-reflog-append-v3-4-9614d310f073@pks.im>
Patrick Steinhardt <ps@pks.im> 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).