mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
config: add git_config_get_split_index()
This new function will be used in a following commit to know if we want to use the split index feature or not. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5662176313
commit
1f44b09b58
1
cache.h
1
cache.h
@ -1821,6 +1821,7 @@ extern int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest);
|
||||
extern int git_config_get_maybe_bool(const char *key, int *dest);
|
||||
extern int git_config_get_pathname(const char *key, const char **dest);
|
||||
extern int git_config_get_untracked_cache(void);
|
||||
extern int git_config_get_split_index(void);
|
||||
|
||||
/*
|
||||
* This is a hack for test programs like test-dump-untracked-cache to
|
||||
|
10
config.c
10
config.c
@ -1709,6 +1709,16 @@ int git_config_get_untracked_cache(void)
|
||||
return -1; /* default value */
|
||||
}
|
||||
|
||||
int git_config_get_split_index(void)
|
||||
{
|
||||
int val;
|
||||
|
||||
if (!git_config_get_maybe_bool("core.splitindex", &val))
|
||||
return val;
|
||||
|
||||
return -1; /* default value */
|
||||
}
|
||||
|
||||
NORETURN
|
||||
void git_die_config_linenr(const char *key, const char *filename, int linenr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user