Re: [PATCH v4 4/5] ref: add symref content check for files backend
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 22, 2024, 16:55 UTC
- Message-ID
- <xmqq5xqn8w6r.fsf@gitster.g>
- In-Reply-To
- <ZvA9agbGaGnF6nxW@ArchLinux>
shejialuo <shejialuo@gmail.com> writes:
Show 10 quoted lines
>> > +`escapeReferent`:: >> > + (ERROR) The referent of a symref is outside the "ref" directory. >> >> I am not sure starting this as ERROR is wise. Users and third-party >> tools make creative uses of the system and I cannot offhand think of >> an argument why it should be forbidden to create a symbolic link to >> our own HEAD or to some worktree-specific ref in another worktree. >> > Do we allow this cross-access (hack)? It might cause some trouble from > my perspective.
If the current implementation allows users to set up and take advantage of, then it is not a hack. It would cause breakage if we make it an error. Does such a symref successfully refer to the referent right now? I think it does.
Thanks.