Re: [PATCH 7/8] builtin/repack.c: drop `DELETE_PACK` macro
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 7, 2023, 18:16 UTC
- Message-ID
- <xmqq1qf9lugh.fsf@gitster.g>
- In-Reply-To
- <ZPmHpqHNzXF0Jbu6@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
> If the intent is to make this check a bit prettier, how about we instead
> introduce a helper function like the following:
>
> ```
> static inline int pack_marked_for_deletion(const struct string_list_item *item)
> {
> return (uintptr) item->util & DELETE_PACK;
> }
> ```Good suggestion.
Or just check if it is NULL (with the new code that only cares about the NULL-ness). Regardless of the implementation, having such a helper would document the intent of the code better, especially if there are multiple places that make that check.
> Other than that the rest of this series looks good to me, thanks. > > Patrick
Thanks.