summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-11-06 06:04:55 -0500
committerGitHub <noreply@github.com>2019-11-06 06:04:55 -0500
commit01ea911b9e14a38f94a0018c13e5f308719aced6 (patch)
tree21ac8c90e47861aae567f7b2f1377ddd0a8ad766 /src
parenta3d8a43755dae7292857a0afa847601d2a85a1af (diff)
parent146e5bf7b1740c0881057d1ca0233ca0852451ab (diff)
downloadlibgit2-01ea911b9e14a38f94a0018c13e5f308719aced6.tar.gz
Merge pull request #5299 from pks-t/pks/config-mem-snapshots
config_mem: implement support for snapshots
Diffstat (limited to 'src')
-rw-r--r--src/config_mem.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/config_mem.c b/src/config_mem.c
index e4006db32..5b573a995 100644
--- a/src/config_mem.c
+++ b/src/config_mem.c
@@ -170,14 +170,6 @@ static int config_memory_unlock(git_config_backend *backend, int success)
return config_error_readonly();
}
-static int config_memory_snapshot(git_config_backend **out, git_config_backend *backend)
-{
- GIT_UNUSED(out);
- GIT_UNUSED(backend);
- git_error_set(GIT_ERROR_CONFIG, "this backend does not support snapshots");
- return -1;
-}
-
static void config_memory_free(git_config_backend *_backend)
{
config_memory_backend *backend = (config_memory_backend *)_backend;
@@ -219,7 +211,7 @@ int git_config_backend_from_string(git_config_backend **out, const char *cfg, si
backend->parent.iterator = config_memory_iterator;
backend->parent.lock = config_memory_lock;
backend->parent.unlock = config_memory_unlock;
- backend->parent.snapshot = config_memory_snapshot;
+ backend->parent.snapshot = git_config_backend_snapshot;
backend->parent.free = config_memory_free;
*out = (git_config_backend *)backend;