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

Re: [PATCH] checkout: constify parameters of checkout_stage() and checkout_merged()

From
Jeff King <peff@peff.net>
Date
Sep 13, 2016, 18:18 UTC
Message-ID
<20160913181807.2ow5fy6b4622sndr@sigill.intra.peff.net>
In-Reply-To
<a66eedc3-fc86-dd45-628c-e38018a03808@web.de>
On Tue, Sep 13, 2016 at 07:11:52PM +0200, René Scharfe wrote:
> Document the fact that checkout_stage() and checkout_merged() don't
> change the objects passed to them by adding the modifier const.

Hmm. Sometimes these big "context" objects are hard to make const, because we end up using them to hold or pass state between functions (e.g., see diff_options). So I'd worry slightly that we'll end up un-consting this in the long run.

That being said, it is easy to revert, and it provides some small benefit, so I don't mind it in the meantime.

-Peff
Previous: René Scharfe
Message 2 of 2 in “checkout: constify parameters of checkout_stage() and checkout_merged()”
  1. checkout: constify parameters of checkout_stage() and checkout_merged()René Scharfe, Sep 13, 2016
  2. Jeff KingSep 13, 2016

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.