git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] revert: initialize const value

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Aug 4, 2025, 13:51 UTC
Message-ID
<ebcc5e06-6d0f-43f0-951a-226558702a9e@gmail.com>
In-Reply-To
<aJC3OiJoqJRnR_My@pks.im>
On 04/08/2025 14:35, Patrick Steinhardt wrote:
Show 10 quoted lines
> On Mon, Aug 04, 2025 at 09:01:41AM -0400, Jeff King wrote:
>> 
>> Hmm, I guess one other option I did not consider: we could just drop the
>> "const". The pointers to it are "const char *", but it is fine for them
>> to point to a non-const variable. Maybe that is less mysterious.
> 
> Initializing the value feels like a pragmatic choice to me. There is no
> downside, and anyone who might be puzzled by the comment is likely to
> git-blame(1) to your commit anyway. So I think the current version is
> good enough.
Yes the current version looks reasonable to me
Thanks
Phillip
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 4 of 5 in “revert: initialize const value”
  1. revert: initialize const valueJeff King, Aug 4, 2025
  2. Jeff KingAug 4, 2025
  3. Patrick SteinhardtAug 4, 2025
  4. Phillip WoodAug 4, 2025
  5. Junio C HamanoAug 4, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.