diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-09-22 21:34:46 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-09-27 14:39:38 +0200 |
commit | 4c562347aec5427ddf78d271f7dc2947ef7aa49e (patch) | |
tree | 693f04fa1afbbf839a591a3231eb57b6a2f5273d /include/git2/config.h | |
parent | 59116392357c17d4e3e36ce8538161cbad52e74c (diff) | |
download | libgit2-4c562347aec5427ddf78d271f7dc2947ef7aa49e.tar.gz |
Add git_config_find_system
This allows the library to guess where the system configuration file
should be located.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2/config.h')
-rw-r--r-- | include/git2/config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 83ed2f91c..bafac6804 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -52,6 +52,18 @@ struct git_config_file { GIT_EXTERN(int) git_config_find_global(char *global_config_path); /** + * Locate the path to the system configuration file + * + * If /etc/gitconfig doesn't exist, it will look for + * %PROGRAMFILES%\Git\etc\gitconfig. + + * @param system_config_path Buffer of GIT_PATH_MAX length to store the path + * @return GIT_SUCCESS if a system configuration file has been + * found. Its path will be stored in `buffer`. + */ +GIT_EXTERN(int) git_config_find_system(char *system_config_path); + +/** * Open the global configuration file * * Utility wrapper that calls `git_config_find_global` |