On Fri, May 31, 2024 at 10:24 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > shejialuo <shejialuo@xxxxxxxxx> 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(_("..."));