]> git.ipfire.org Git - thirdparty/git.git/commit
refs: refactor reference status flags
authorPatrick Steinhardt <ps@pks.im>
Thu, 23 Oct 2025 07:16:13 +0000 (09:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Nov 2025 15:32:25 +0000 (07:32 -0800)
commiteb2934d94b43388642ce4840994800310a6d3456
tree01d9c3d9736c21beb61ba6708c3496baeac60130
parent4cea0422879f6a64c0f7ad0ddac6d43897a53e94
refs: refactor reference status flags

The reference flags encode information like whether or not a reference
is a symbolic reference or whether it may be broken. This information is
stored in a `int flags` bitfield, which is in conflict with our modern
best practices; we tend to use an unsigned integer to store flags.

Change the type of the field to be `unsigned`. While at it, refactor the
individual flags to be part of an `enum` instead of using preprocessor
defines.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.h