diff options
| author | Etienne Samson <samson.etienne@gmail.com> | 2018-10-08 20:51:20 +0200 |
|---|---|---|
| committer | Etienne Samson <samson.etienne@gmail.com> | 2018-11-02 14:58:12 +0100 |
| commit | 37acffac08cd9bf7eb26dacc6ac30de74ee09d65 (patch) | |
| tree | 011c20ecb8556b2221334c89bf49d8b774b18617 | |
| parent | 10cba764a528a631b0261542cffdc02bf3956d75 (diff) | |
| download | libgit2-37acffac08cd9bf7eb26dacc6ac30de74ee09d65.tar.gz | |
remote: remove static create_internal function
| -rw-r--r-- | src/remote.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/remote.c b/src/remote.c index ba4e2161c..393068b31 100644 --- a/src/remote.c +++ b/src/remote.c @@ -224,7 +224,7 @@ int git_remote_create_init_options(git_remote_create_options *opts, unsigned int return 0; } -static int create_internal(git_remote **out, const char *url, const git_remote_create_options *opts) +int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts) { git_remote *remote = NULL; git_config *config_ro = NULL, *config_rw; @@ -350,18 +350,13 @@ int git_remote_create(git_remote **out, git_repository *repo, const char *name, opts.repository = repo; opts.name = name; - error = create_internal(out, url, &opts); + error = git_remote_create_with_opts(out, url, &opts); git_buf_dispose(&buf); return error; } -int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts) -{ - return create_internal(out, url, opts); -} - int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch) { int error; @@ -375,7 +370,7 @@ int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, con opts.fetchspec = fetch; opts.flags = GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC; - return create_internal(out, url, &opts); + return git_remote_create_with_opts(out, url, &opts); } int git_remote_create_anonymous(git_remote **out, git_repository *repo, const char *url) @@ -384,12 +379,12 @@ int git_remote_create_anonymous(git_remote **out, git_repository *repo, const ch opts.repository = repo; - return create_internal(out, url, &opts); + return git_remote_create_with_opts(out, url, &opts); } int git_remote_create_detached(git_remote **out, const char *url) { - return create_internal(out, url, NULL); + return git_remote_create_with_opts(out, url, NULL); } int git_remote_dup(git_remote **dest, git_remote *source) |
