summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/remote.c b/src/remote.c
index 3a754d4bd..0a6b72fb9 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -347,7 +347,7 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
git_buf buf = GIT_BUF_INIT;
const char *val;
int error = 0;
- git_config *config, *repo_config;
+ git_config *config;
struct refspec_cb_data data = { NULL };
bool optional_setting_found = false, found;
@@ -356,10 +356,7 @@ int git_remote_load(git_remote **out, git_repository *repo, const char *name)
if ((error = ensure_remote_name_is_valid(name)) < 0)
return error;
- if (git_repository_config__weakptr(&repo_config, repo) < 0)
- return -1;
-
- if ((error = git_config_snapshot(&config, repo_config)) < 0)
+ if ((error = git_repository_config_snapshot(&config, repo)) < 0)
return error;
remote = git__malloc(sizeof(git_remote));