From 76e08227e5bc8b6e3d208da965d2421911d25ae3 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 5 Nov 2013 22:02:36 +0100 Subject: Rename suffixcmp() to has_suffix() and invert its result Now has_suffix() returns 1 when the suffix is present and 0 otherwise. The old name followed the pattern anything-cmp(), which suggests a general comparison function suitable for e.g. sorting objects. But this was not the case for suffixcmp(). Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- git-compat-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-compat-util.h') diff --git a/git-compat-util.h b/git-compat-util.h index 7776f126d3..0f6a31e1b0 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -351,7 +351,7 @@ extern void set_error_routine(void (*routine)(const char *err, va_list params)); extern void set_die_is_recursing_routine(int (*routine)(void)); extern int prefixcmp(const char *str, const char *prefix); -extern int suffixcmp(const char *str, const char *suffix); +extern int has_suffix(const char *str, const char *suffix); static inline const char *skip_prefix(const char *str, const char *prefix) { -- cgit v1.2.1