summaryrefslogtreecommitdiff
path: root/src/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/repository.c b/src/repository.c
index 10ed12b64..33aaee841 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -1140,8 +1140,7 @@ static int repo_init_create_origin(git_repository *repo, const char *url)
int error;
git_remote *remote;
- if (!(error = git_remote_add(&remote, repo, GIT_REMOTE_ORIGIN, url))) {
- error = git_remote_save(remote);
+ if (!(error = git_remote_create(&remote, repo, GIT_REMOTE_ORIGIN, url))) {
git_remote_free(remote);
}