summaryrefslogtreecommitdiff
path: root/include/git2/sys/config.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-03-13 17:11:34 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-04-18 16:03:01 +0200
commit55ebd7d369a789f27fe1ad6b8ec8965aa1335d08 (patch)
tree16ec80013850add231a1c01bdc3de6e93f17cbaa /include/git2/sys/config.h
parent36913b8cb497487728ee9bab383d4c1205685927 (diff)
downloadlibgit2-55ebd7d369a789f27fe1ad6b8ec8965aa1335d08.tar.gz
config: implement config snapshotting
In order to have consistent views of the config files for remotes, submodules et al. and a configuration that represents what is currently stored on-disk, we need a way to provide a view of the configuration that does not change. The goal here is to provide the snapshotting part by creating a read-only copy of the state of the configuration at a particular point in time, which does not change when a repository's main config changes.
Diffstat (limited to 'include/git2/sys/config.h')
-rw-r--r--include/git2/sys/config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/git2/sys/config.h b/include/git2/sys/config.h
index 3df2ba327..090588999 100644
--- a/include/git2/sys/config.h
+++ b/include/git2/sys/config.h
@@ -64,6 +64,8 @@ struct git_config_backend {
int (*del_multivar)(struct git_config_backend *, const char *key, const char *regexp);
int (*iterator)(git_config_iterator **, struct git_config_backend *);
int (*refresh)(struct git_config_backend *);
+ /** Produce a read-only version of this backend */
+ int (*snapshot)(struct git_config_backend **, struct git_config_backend *);
void (*free)(struct git_config_backend *);
};
#define GIT_CONFIG_BACKEND_VERSION 1