diff options
Diffstat (limited to 'include/git2/config.h')
| -rw-r--r-- | include/git2/config.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 21d8a0b05..a3202c2b1 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -61,6 +61,9 @@ typedef struct { * may be used on any `git_config` call to load the * global configuration file. * + * This method will not guess the path to the xdr compatible + * config file (.config/git/config). + * * @param global_config_path Buffer of GIT_PATH_MAX length to store the path * @return 0 if a global configuration file has been * found. Its path will be stored in `buffer`. @@ -68,6 +71,23 @@ typedef struct { GIT_EXTERN(int) git_config_find_global(char *global_config_path, size_t length); /** + * Locate the path to the global xdr compatible configuration file + * + * The xdr compatible configuration file is usually + * located in `$HOME/.config/git/config`. + * + * This method will try to guess the full path to that + * file, if the file exists. The returned path + * may be used on any `git_config` call to load the + * global configuration file. + * + * @param global_config_path Buffer of GIT_PATH_MAX length to store the path + * @return 0 if a global configuration file has been + * found. Its path will be stored in `buffer`. + */ +GIT_EXTERN(int) git_config_find_xdr(char *global_config_path, size_t length); + +/** * Locate the path to the system configuration file * * If /etc/gitconfig doesn't exist, it will look for |
