diff options
Diffstat (limited to 'include/git2/config.h')
-rw-r--r-- | include/git2/config.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 67408f90f..e417cb379 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -56,6 +56,7 @@ struct git_config_file { int (*set_multivar)(git_config_file *cfg, const char *name, const char *regexp, const char *value); int (*del)(struct git_config_file *, const char *key); int (*foreach)(struct git_config_file *, const char *, int (*fn)(const git_config_entry *, void *), void *data); + int (*refresh)(struct git_config_file *); void (*free)(struct git_config_file *); }; @@ -243,6 +244,19 @@ GIT_EXTERN(int) git_config_open_level( unsigned int level); /** + * Reload changed config files + * + * A config file may be changed on disk out from under the in-memory + * config object. This function causes us to look for files that have + * been modified since we last loaded them and refresh the config with + * the latest information. + * + * @param cfg The configuration to refresh + * @return 0 or an error code + */ +GIT_EXTERN(int) git_config_refresh(git_config *cfg); + +/** * Free the configuration and its associated memory and files * * @param cfg the configuration to free |