summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-16 23:59:46 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-17 09:39:03 -0800
commit8420ccd8b884e1edceca9ea5824f3ff300c0c4ba (patch)
treee3dea24d016ce539ebffc20c32664601c99ea28d /cache.h
parente923eaeb901ff056421b9007adcbbce271caa7b6 (diff)
downloadgit-8420ccd8b884e1edceca9ea5824f3ff300c0c4ba.tar.gz
git_config_maybe_bool()
Some configuration variables can take boolean values in addition to enumeration specific to them. Introduce git_config_maybe_bool() that returns 0 or 1 if the given value is boolean, or -1 if not, so that a parser for such a variable can check for boolean first and then parse other kinds of values as a fallback. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index d478eff1f3..dd3be0a065 100644
--- a/cache.h
+++ b/cache.h
@@ -924,6 +924,7 @@ extern int git_config_int(const char *, const char *);
extern unsigned long git_config_ulong(const char *, const char *);
extern int git_config_bool_or_int(const char *, const char *, int *);
extern int git_config_bool(const char *, const char *);
+extern int git_config_maybe_bool(const char *, const char *);
extern int git_config_string(const char **, const char *, const char *);
extern int git_config_pathname(const char **, const char *, const char *);
extern int git_config_set(const char *, const char *);