diff options
| author | Ben Straub <bs@github.com> | 2012-12-20 10:51:09 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-12-20 10:52:57 -0800 |
| commit | 29f27599eab750d2b4b8935a14be8b596b7affe2 (patch) | |
| tree | 7ee49c6386cc18d59969ab5d21805ed0624f9df0 /src | |
| parent | 316bca697f16e6fc0c9ecc943e84e9af3b39812b (diff) | |
| download | libgit2-29f27599eab750d2b4b8935a14be8b596b7affe2.tar.gz | |
Rename remote creation APIs
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
Diffstat (limited to 'src')
| -rw-r--r-- | src/clone.c | 2 | ||||
| -rw-r--r-- | src/remote.c | 6 | ||||
| -rw-r--r-- | src/repository.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/clone.c b/src/clone.c index fae2458ca..9c4a5d9a1 100644 --- a/src/clone.c +++ b/src/clone.c @@ -267,7 +267,7 @@ static int create_and_configure_origin( int error; git_remote *origin = NULL; - if ((error = git_remote_add(&origin, repo, options->remote_name, url)) < 0) + if ((error = git_remote_create(&origin, repo, options->remote_name, url)) < 0) goto on_error; git_remote_set_cred_acquire_cb(origin, options->cred_acquire_cb, diff --git a/src/remote.c b/src/remote.c index 28ce88a93..4a5e14454 100644 --- a/src/remote.c +++ b/src/remote.c @@ -83,7 +83,7 @@ cleanup: return error; } -int git_remote_new(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch) +int git_remote_create_inmemory(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch) { git_remote *remote; git_buf fetchbuf = GIT_BUF_INIT; @@ -998,7 +998,7 @@ int git_remote_list(git_strarray *remotes_list, git_repository *repo) return 0; } -int git_remote_add(git_remote **out, git_repository *repo, const char *name, const char *url) +int git_remote_create(git_remote **out, git_repository *repo, const char *name, const char *url) { git_buf buf = GIT_BUF_INIT; int error; @@ -1009,7 +1009,7 @@ int git_remote_add(git_remote **out, git_repository *repo, const char *name, con if (git_buf_printf(&buf, "+refs/heads/*:refs/remotes/%s/*", name) < 0) return -1; - if (git_remote_new(out, repo, name, url, git_buf_cstr(&buf)) < 0) + if (git_remote_create_inmemory(out, repo, name, url, git_buf_cstr(&buf)) < 0) goto on_error; git_buf_free(&buf); diff --git a/src/repository.c b/src/repository.c index 10ed12b64..ea4be9dbe 100644 --- a/src/repository.c +++ b/src/repository.c @@ -1140,7 +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))) { + if (!(error = git_remote_create(&remote, repo, GIT_REMOTE_ORIGIN, url))) { error = git_remote_save(remote); git_remote_free(remote); } |
