diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/config.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 5a2f956fd..724788ae0 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -195,6 +195,21 @@ GIT_EXTERN(int) git_config_open_level( unsigned int level); /** + * Open the global/XDG configuration file according to git's rules + * + * Git allows you to store your global configuration at + * `$HOME/.config` or `$XDG_CONFIG_HOME/git/config`. For backwards + * compatability, the XDG file shouldn't be used unless the use has + * created it explicitly. With this function you'll open the correct + * one to write to. + * + * @param out pointer in which to store the config object + * @param config the config object in which to look + */ +GIT_EXTERN(int) git_config_open_global(git_config **out, git_config *config); + + +/** * Reload changed config files * * A config file may be changed on disk out from under the in-memory |
