summaryrefslogtreecommitdiff
path: root/string-list.h
diff options
context:
space:
mode:
authorshejialuo <shejialuo@gmail.com>2025-10-06 14:32:23 +0800
committerJunio C Hamano <gitster@pobox.com>2025-10-06 09:11:07 -0700
commit03ef7762ea12f3b034a2281040bd61c74fd36386 (patch)
tree8d16d26cba726ee89712b264bb25e024cba922c9 /string-list.h
parent2462961280690837670d997bde64bd4ebf8ae66d (diff)
string-list: use bool instead of int for "exact_match"
The "exact_match" parameter in "get_entry_index" is used to indicate whether a string is found or not, which is fundamentally a true/false value. As we allow the use of bool, let's use bool instead of int to make the function more semantically clear. Signed-off-by: shejialuo <shejialuo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.h')
-rw-r--r--string-list.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/string-list.h b/string-list.h
index 2b438c7733..bc7f38022e 100644
--- a/string-list.h
+++ b/string-list.h
@@ -172,7 +172,7 @@ void string_list_remove_empty_items(struct string_list *list, int free_util);
/* Use these functions only on sorted lists: */
/** Determine if the string_list has a given string or not. */
-int string_list_has_string(const struct string_list *list, const char *string);
+bool string_list_has_string(const struct string_list *list, const char *string);
int string_list_find_insert_index(const struct string_list *list, const char *string,
int negative_existing_index);