Re: [GSoC][PATCH 2/2] refs: add name and content check for file backend
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 31, 2024, 18:31 UTC
- Message-ID
- <CAPig+cRpwESDkZS3yFN8W3y8yugauecMbQC26rvYjVijH=2YLA@mail.gmail.com>
- In-Reply-To
- <xmqqa5k6jc0s.fsf@gitster.g>
On Fri, May 31, 2024 at 10:24 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> shejialuo <shejialuo@gmail.com> writes:
> > + error(_("unexpected file type for '%s'"), iter->basename);
> > + ret = -1;
>
> This is wrong. A symbolic link is a valid symbolic ref, even though
> we no longer create such a symbolic ref by default.Very minor additional note: error() unconditionally returns -1 in order to support this pattern:
ret = error(_("..."));