remote: remove static create_internal function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/remote.c b/src/remote.c
index ba4e216..393068b 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)