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

Re: [PATCH 1/2] refs: adapt `initial_transaction` flag to be unsigned

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 26, 2024, 08:22 UTC
Message-ID
<xmqqjzcqxv3x.fsf@gitster.g>
In-Reply-To
<20241125-pks-refs-migration-optimization-followup-v1-1-0e1b4a2af384@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> The `initial_transaction` flag is tracked as a signed integer, but we
> typically pass around flags via unsigned integers. Adapt the type
> accordingly.

It would not matter while the information in the variable is 1 bit and the check is "is the whole variable 0?", which is what the current code does on this parameter. But when we'd start using the parameter as a flag word to stuff more bits, this starts to matter.

Good future-proofing.  Thanks.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 of 6 in “refs: stylistic improvements to ref migration optimization”
  1. 0/2 refs: stylistic improvements to ref migration optimizationPatrick Steinhardt, Nov 25, 2024
  2. 1/2 refs: adapt `initial_transaction` flag to be unsignedPatrick Steinhardt, Nov 25, 2024
  3. Junio C HamanoNov 26, 2024
  4. 2/2 reftable: rename scratch bufferPatrick Steinhardt, Nov 25, 2024
  5. Christian CouderNov 25, 2024
  6. Junio C HamanoNov 25, 2024

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.