From 23b0c4782e5f9357e6189253021053a4404ddf4e Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Tue, 26 Aug 2014 17:23:21 +0200 Subject: config.c: add git_env_ulong() to parse environment variable The new function parses an integeral value that fits in unsigned long in human readable form, i.e. possibly with unit suffix, e.g. 10k = 10240, etc., from an environment variable. Parsing of GIT_MMAP_LIMIT and GIT_ALLOC_LIMIT will use it in later patches. Signed-off-by: Steffen Prohaska Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index fcb511db70..b820b6adc1 100644 --- a/cache.h +++ b/cache.h @@ -1318,6 +1318,7 @@ extern int git_config_rename_section_in_file(const char *, const char *, const c 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 unsigned long git_env_ulong(const char *, unsigned long); extern int git_config_system(void); extern int config_error_nonbool(const char *); #if defined(__GNUC__) -- cgit v1.2.1