summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e4f614)
raw | patch | inline | side by side (parent: 5e4f614)
author | Lars R. Damerow <lars@pixar.com> | |
Wed, 17 Mar 2010 19:55:51 +0000 (12:55 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 28 Mar 2010 16:19:05 +0000 (09:19 -0700) |
Since this function is the preferred way to handle boolean environment
variables it's useful to have it available to other files.
Signed-off-by: Lars R. Damerow <lars@pixar.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
variables it's useful to have it available to other files.
Signed-off-by: Lars R. Damerow <lars@pixar.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h | patch | blob | history | |
config.c | patch | blob | history |
index 2928107bb135004e11f6a11a625067545680b62a..535153e1b32e2f9c7b0644aadccd725a0613746d 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -949,6 +949,7 @@ extern int git_config_set_multivar(const char *, const char *, const char *, int
extern int git_config_rename_section(const char *, const char *);
extern const char *git_etc_gitconfig(void);
extern int check_repository_format_version(const char *var, const char *value, void *cb);
+extern int git_env_bool(const char *, int);
extern int git_config_system(void);
extern int git_config_global(void);
extern int config_error_nonbool(const char *);
diff --git a/config.c b/config.c
index 6963fbea43e6420f5f8dafc5b94fb5c27de6ffd2..70e460016e1bb56295686768dd0b1cc6b981881e 100644 (file)
--- a/config.c
+++ b/config.c
return system_wide;
}
-static int git_env_bool(const char *k, int def)
+int git_env_bool(const char *k, int def)
{
const char *v = getenv(k);
return v ? git_config_bool(k, v) : def;