Re: [PATCH] git: remove unneeded casts
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 19, 2022, 01:07 UTC
- Message-ID
- <xmqqo7s0urpe.fsf@gitster.g>
- In-Reply-To
- <Y53E7PNu05VTdvXG@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> ... So perhaps: > > - this used to be "char **argv" because of main(), but either because > of becoming a builtin or cmd_main() it is now const > > - this used to require casting from non-const to const to free() > > - etc, with one-offs for cases that don't fit in any group > > The keeps a single patch's explanation from being too overwhelming, and > avoids repeating yourself when the same logic applies to multiple cases.
Thanks, that would be the organization I would use, too, if I were doing this change myself.
> That said, I am happy with any solution that explains why we are sure > each case is OK to do. :)
Yup.