Thread (1 message) 1 message, 1 author, 2023-09-07

Re: [PATCH 7/8] builtin/repack.c: drop `DELETE_PACK` macro

From: Junio C Hamano <hidden>
Date: 2023-09-07 18:17:32

Patrick Steinhardt [off-list ref] writes:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help