Re: [PATCH v2] builtin: allow passing custom data to sub-commands
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2024, 19:27 UTC
- Message-ID
- <xmqqy115x0be.fsf@gitster.g>
- In-Reply-To
- <CAOLa=ZTeRUT6Ex5Pa-fM1i-QbTfnmDN=o=MU_N2VFeLQwbscgg@mail.gmail.com>
karthik nayak <karthik.188@gmail.com> writes:
> Could you elaborate on why you think this is an over-optimization? We > don't loose functionality with this, nor do we have to have add > additional code to handle the typecasting to `struct repository *` if > needed. But would definitely like to resolve anything I missed.
I do not know if it is an optimization, but if you know it is of a specific type, casting back and force with "void *" loses type safety, no?