From b1bda751739d90e1a94b47397676bcb8eebf16d5 Mon Sep 17 00:00:00 2001 From: Calvin Wan Date: Fri, 29 Sep 2023 14:20:51 -0700 Subject: parse: separate out parsing functions from config.h The files config.{h,c} contain functions that have to do with parsing, but not config. In order to further reduce all-in-one headers, separate out functions in config.c that do not operate on config into its own file, parse.h, and update the include directives in the .c files that need only such functions accordingly. Signed-off-by: Calvin Wan Signed-off-by: Jonathan Tan Signed-off-by: Junio C Hamano --- config.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'config.h') diff --git a/config.h b/config.h index 6332d74904..14f881ecfa 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ #include "hashmap.h" #include "string-list.h" #include "repository.h" - +#include "parse.h" /** * The config API gives callers a way to access Git configuration files @@ -243,16 +243,6 @@ int config_with_options(config_fn_t fn, void *, * The following helper functions aid in parsing string values */ -int git_parse_ssize_t(const char *, ssize_t *); -int git_parse_ulong(const char *, unsigned long *); -int git_parse_int(const char *value, int *ret); - -/** - * Same as `git_config_bool`, except that it returns -1 on error rather - * than dying. - */ -int git_parse_maybe_bool(const char *); - /** * Parse the string to an integer, including unit factors. Dies on error; * otherwise, returns the parsed result. @@ -385,8 +375,6 @@ int git_config_rename_section(const char *, const char *); int git_config_rename_section_in_file(const char *, const char *, const char *); int git_config_copy_section(const char *, const char *); int git_config_copy_section_in_file(const char *, const char *, const char *); -int git_env_bool(const char *, int); -unsigned long git_env_ulong(const char *, unsigned long); int git_config_system(void); int config_error_nonbool(const char *); #if defined(__GNUC__) -- cgit v1.2.3