summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2012-10-31 20:52:16 +0100
committerVicent Marti <tanoku@gmail.com>2012-10-31 20:52:16 +0100
commit003808b38cd09dab8748f93bb44a0df9aca6820c (patch)
tree9ccd6e14c1990baac6f4ac05237f170d03142d61 /include/git2
parenta9db123b09e8af94d33cccf30c908701dd491fa7 (diff)
parentc1f61af66b35533ee8268e615de6ded74b2ce342 (diff)
downloadlibgit2-003808b38cd09dab8748f93bb44a0df9aca6820c.tar.gz
Merge branch 'config-refresh' into development
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/config.h14
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