From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Rose via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Seija Kijin <doremylover123@gmail.com>,
Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH] git: remove unneeded casts
Date: Mon, 19 Dec 2022 10:07:09 +0900 [thread overview]
Message-ID: <xmqqo7s0urpe.fsf@gitster.g> (raw)
In-Reply-To: <Y53E7PNu05VTdvXG@coredump.intra.peff.net> (Jeff King's message of "Sat, 17 Dec 2022 08:32:28 -0500")
Jeff King <peff@peff.net> writes:
> ... 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.
next prev parent reply other threads:[~2022-12-19 1:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 15:35 [PATCH] git: remove unneeded casts Rose via GitGitGadget
2022-12-14 21:16 ` Jeff King
2022-12-14 23:49 ` Junio C Hamano
2022-12-17 13:32 ` Jeff King
2022-12-19 1:07 ` Junio C Hamano [this message]
2022-12-15 10:07 ` Ævar Arnfjörð Bjarmason
2022-12-17 13:55 ` Jeff King
2022-12-15 10:18 ` Phillip Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo7s0urpe.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=doremylover123@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.