reflog: rename unreachable

In C23, "unreachable" is a macro that invokes undefined behavior if it is invoked. To make sure that our code compiles on a variety of C versions, rename unreachable to "is_unreachable". Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Nov 17, 2024 at 01:31 UTC 639cd8db63b07c958062bde4d3823dadbf469b0b
1 file changed +2 -2
reflog.c
+2 -2
@@ -210,7 +210,7 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb)
210 cb->mark_list = leftover;
211 }
212
213 -static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid)
213 +static int is_unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid)
214 {
215 /*
216 * We may or may not have the commit yet - if not, look it
@@ -265,7 +265,7 @@ int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid,
265 return 1;
266 case UE_NORMAL:
267 case UE_HEAD:
268 - if (unreachable(cb, old_commit, ooid) || unreachable(cb, new_commit, noid))
268 + if (is_unreachable(cb, old_commit, ooid) || is_unreachable(cb, new_commit, noid))
269 return 1;
270 break;
271 }