diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/checkout.c | 3 | ||||
-rw-r--r-- | src/config.c | 17 | ||||
-rw-r--r-- | src/config_file.c | 9 |
3 files changed, 1 insertions, 28 deletions
diff --git a/src/checkout.c b/src/checkout.c index 8aaf8c5ae..fb425bb0c 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -2038,8 +2038,7 @@ static int checkout_data_init( if ((data->opts.checkout_strategy & GIT_CHECKOUT_NO_REFRESH) == 0) { git_config *cfg; - if ((error = git_repository_config__weakptr(&cfg, repo)) < 0 || - (error = git_config_refresh(cfg)) < 0) + if ((error = git_repository_config__weakptr(&cfg, repo)) < 0) goto cleanup; /* Get the repository index and reload it (unless we're checking diff --git a/src/config.c b/src/config.c index 8a0fb653c..0f8c24465 100644 --- a/src/config.c +++ b/src/config.c @@ -326,23 +326,6 @@ int git_config_add_backend( return 0; } -int git_config_refresh(git_config *cfg) -{ - int error = 0; - size_t i; - - for (i = 0; i < cfg->files.length && !error; ++i) { - file_internal *internal = git_vector_get(&cfg->files, i); - git_config_backend *file = internal->file; - error = file->refresh(file); - } - - if (!error && GIT_REFCOUNT_OWNER(cfg) != NULL) - git_repository__cvar_cache_clear(GIT_REFCOUNT_OWNER(cfg)); - - return error; -} - /* * Loop over all the variables */ diff --git a/src/config_file.c b/src/config_file.c index 1f73e7e11..093e74a70 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -698,7 +698,6 @@ int git_config_file__ondisk(git_config_backend **out, const char *path) backend->header.parent.del = config_delete; backend->header.parent.del_multivar = config_delete_multivar; backend->header.parent.iterator = config_iterator_new; - backend->header.parent.refresh = config_refresh; backend->header.parent.snapshot = config_snapshot; backend->header.parent.free = backend_free; @@ -744,13 +743,6 @@ static int config_delete_readonly(git_config_backend *cfg, const char *name) return config_error_readonly(); } -static int config_refresh_readonly(git_config_backend *cfg) -{ - GIT_UNUSED(cfg); - - return config_error_readonly(); -} - static void backend_readonly_free(git_config_backend *_backend) { diskfile_backend *backend = (diskfile_backend *)_backend; @@ -804,7 +796,6 @@ int git_config_file__snapshot(git_config_backend **out, diskfile_backend *in) backend->header.parent.del = config_delete_readonly; backend->header.parent.del_multivar = config_delete_multivar_readonly; backend->header.parent.iterator = config_iterator_new; - backend->header.parent.refresh = config_refresh_readonly; backend->header.parent.free = backend_readonly_free; *out = (git_config_backend *)backend; |