summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/submodule.c b/src/submodule.c
index c7fd50c77..9231f08b1 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -15,7 +15,7 @@
#include "buf_text.h"
#include "vector.h"
#include "posix.h"
-#include "config_file.h"
+#include "config_backend.h"
#include "config.h"
#include "repository.h"
#include "tree.h"
@@ -335,9 +335,9 @@ int git_submodule_lookup(
mods = open_gitmodules(repo, GITMODULES_EXISTING);
if (mods)
- error = git_config_file_foreach_match(mods, pattern, find_by_path, &data);
+ error = git_config_backend_foreach_match(mods, pattern, find_by_path, &data);
- git_config_file_free(mods);
+ git_config_backend_free(mods);
if (error < 0) {
git_submodule_free(sm);
@@ -794,11 +794,11 @@ int git_submodule_add_setup(
}
if ((error = git_buf_printf(&name, "submodule.%s.path", path)) < 0 ||
- (error = git_config_file_set_string(mods, name.ptr, path)) < 0)
+ (error = git_config_backend_set_string(mods, name.ptr, path)) < 0)
goto cleanup;
if ((error = submodule_config_key_trunc_puts(&name, "url")) < 0 ||
- (error = git_config_file_set_string(mods, name.ptr, url)) < 0)
+ (error = git_config_backend_set_string(mods, name.ptr, url)) < 0)
goto cleanup;
git_buf_clear(&name);
@@ -836,7 +836,7 @@ cleanup:
if (out != NULL)
*out = sm;
- git_config_file_free(mods);
+ git_config_backend_free(mods);
git_repository_free(subrepo);
git_buf_dispose(&real_url);
git_buf_dispose(&name);
@@ -1035,14 +1035,14 @@ static int write_var(git_repository *repo, const char *name, const char *var, co
goto cleanup;
if (val)
- error = git_config_file_set_string(mods, key.ptr, val);
+ error = git_config_backend_set_string(mods, key.ptr, val);
else
- error = git_config_file_delete(mods, key.ptr);
+ error = git_config_backend_delete(mods, key.ptr);
git_buf_dispose(&key);
cleanup:
- git_config_file_free(mods);
+ git_config_backend_free(mods);
return error;
}
@@ -2072,12 +2072,12 @@ static git_config_backend *open_gitmodules(
return NULL;
if (okay_to_create || git_path_isfile(path.ptr)) {
- /* git_config_file__ondisk should only fail if OOM */
- if (git_config_file__ondisk(&mods, path.ptr) < 0)
+ /* git_config_backend_from_file should only fail if OOM */
+ if (git_config_backend_from_file(&mods, path.ptr) < 0)
mods = NULL;
/* open should only fail here if the file is malformed */
- else if (git_config_file_open(mods, GIT_CONFIG_LEVEL_LOCAL, repo) < 0) {
- git_config_file_free(mods);
+ else if (git_config_backend_open(mods, GIT_CONFIG_LEVEL_LOCAL, repo) < 0) {
+ git_config_backend_free(mods);
mods = NULL;
}
}