Re: [PATCH 0/5] refs: remove functions without ref store
On Mon, May 06, 2024 at 11:20:05PM -0700, Junio C Hamano wrote:
Show 20 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > message. The best I could come up with is the following:
> >
> > #define REPLACED_REFS_FUNC(func) func ## was_replaced_by_refs_### func
> >
> > Which results in compiler errors like this:
> >
> > bisect.c:712:6: error: use of undeclared identifier 'read_ref_was_replaced_by_refs_read_ref'
> > 712 | if (read_ref("BISECT_EXPECTED_REV", &expected_oid))
> >
> > What is still missing is the bit of informatino that you need to pass in
> > `get_main_ref_store()`. But maybe this is good enough?
>
> What I had in mind was a lot more stupid like the attached. For
> illustration purposes, I just did only one, but you got the idea.
> Thanks to "#if 0", the compilation will fail, the compiler telling
> the developer "resolve_ref_unsafe()? what are you talking about?",
> and the developer will grep for that name to find the hint at the
> end.That works for me, too. Thanks!
Patrick