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

Re: [PATCH] revert: initialize const value

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2025, 14:26 UTC
Message-ID
<xmqqy0rz88ol.fsf@gitster.g>
In-Reply-To
<aJC3OiJoqJRnR_My@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> 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.

I had to run "git blame" to find out who was being overly clever by using a sentinel like this. I am glad that it was not me ;-)

The fix looks good. It may make it even better if we renamed the variable to sentinel_address or something ;-).

Previous: Phillip Wood
Message 5 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.