]> git.ipfire.org Git - thirdparty/git.git/commit
git-compat-util: convert string predicates to return bool
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Wed, 16 Jul 2025 09:38:29 +0000 (10:38 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jul 2025 15:18:06 +0000 (08:18 -0700)
commitf3ba426e3539b2d585944f9d6425dbc13b7d0d28
tree784a6054599fd62c283285bd6458beb7786b6be6
parentbfa405ea36b1d3dd9bb3999a6a5590c15af13fae
git-compat-util: convert string predicates to return bool

Since 8277dbe987 (git-compat-util: convert skip_{prefix,suffix}{,_mem}
to bool, 2023-12-16) a number of our string predicates have been
returning bool instead of int. Now that we've declared that experiment
a success, let's convert the return type of the case-independent
skip_iprefix() and skip_iprefix_mem() functions to match the return
type of their case-dependent equivalents. Returning bool instead of
int makes it clear that these functions are predicates.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h