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.