]> git.proxmox.com Git - libgit2.git/blobdiff - tests/config/readonly.c
New upstream version 0.28.1+dfsg.1
[libgit2.git] / tests / config / readonly.c
index a424922c1cf114ddf7063869c558489ce4ee7d02..5d544b8cb4a08bb9bea67ce4ff1893d58f30c169 100644 (file)
@@ -1,5 +1,5 @@
 #include "clar_libgit2.h"
-#include "config_file.h"
+#include "config_backend.h"
 #include "config.h"
 #include "path.h"
 
@@ -20,7 +20,7 @@ void test_config_readonly__writing_to_readonly_fails(void)
 {
        git_config_backend *backend;
 
-       cl_git_pass(git_config_file__ondisk(&backend, "global"));
+       cl_git_pass(git_config_backend_from_file(&backend, "global"));
        backend->readonly = 1;
        cl_git_pass(git_config_add_backend(cfg, backend, GIT_CONFIG_LEVEL_GLOBAL, NULL, 0));
 
@@ -32,11 +32,11 @@ void test_config_readonly__writing_to_cfg_with_rw_precedence_succeeds(void)
 {
        git_config_backend *backend;
 
-       cl_git_pass(git_config_file__ondisk(&backend, "global"));
+       cl_git_pass(git_config_backend_from_file(&backend, "global"));
        backend->readonly = 1;
        cl_git_pass(git_config_add_backend(cfg, backend, GIT_CONFIG_LEVEL_GLOBAL, NULL, 0));
 
-       cl_git_pass(git_config_file__ondisk(&backend, "local"));
+       cl_git_pass(git_config_backend_from_file(&backend, "local"));
        cl_git_pass(git_config_add_backend(cfg, backend, GIT_CONFIG_LEVEL_LOCAL, NULL, 0));
 
        cl_git_pass(git_config_set_string(cfg, "foo.bar", "baz"));
@@ -50,11 +50,11 @@ void test_config_readonly__writing_to_cfg_with_ro_precedence_succeeds(void)
 {
        git_config_backend *backend;
 
-       cl_git_pass(git_config_file__ondisk(&backend, "local"));
+       cl_git_pass(git_config_backend_from_file(&backend, "local"));
        backend->readonly = 1;
        cl_git_pass(git_config_add_backend(cfg, backend, GIT_CONFIG_LEVEL_LOCAL, NULL, 0));
 
-       cl_git_pass(git_config_file__ondisk(&backend, "global"));
+       cl_git_pass(git_config_backend_from_file(&backend, "global"));
        cl_git_pass(git_config_add_backend(cfg, backend, GIT_CONFIG_LEVEL_GLOBAL, NULL, 0));
 
        cl_git_pass(git_config_set_string(cfg, "foo.bar", "baz"));