Skip to content

Commit 37acffa

Browse files
committed
remote: remove static create_internal function
1 parent 10cba76 commit 37acffa

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/remote.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int git_remote_create_init_options(git_remote_create_options *opts, unsigned int
224224
return 0;
225225
}
226226

227-
static int create_internal(git_remote **out, const char *url, const git_remote_create_options *opts)
227+
int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts)
228228
{
229229
git_remote *remote = NULL;
230230
git_config *config_ro = NULL, *config_rw;
@@ -350,18 +350,13 @@ int git_remote_create(git_remote **out, git_repository *repo, const char *name,
350350
opts.repository = repo;
351351
opts.name = name;
352352

353-
error = create_internal(out, url, &opts);
353+
error = git_remote_create_with_opts(out, url, &opts);
354354

355355
git_buf_dispose(&buf);
356356

357357
return error;
358358
}
359359

360-
int git_remote_create_with_opts(git_remote **out, const char *url, const git_remote_create_options *opts)
361-
{
362-
return create_internal(out, url, opts);
363-
}
364-
365360
int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch)
366361
{
367362
int error;
@@ -375,7 +370,7 @@ int git_remote_create_with_fetchspec(git_remote **out, git_repository *repo, con
375370
opts.fetchspec = fetch;
376371
opts.flags = GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC;
377372

378-
return create_internal(out, url, &opts);
373+
return git_remote_create_with_opts(out, url, &opts);
379374
}
380375

381376
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
384379

385380
opts.repository = repo;
386381

387-
return create_internal(out, url, &opts);
382+
return git_remote_create_with_opts(out, url, &opts);
388383
}
389384

390385
int git_remote_create_detached(git_remote **out, const char *url)
391386
{
392-
return create_internal(out, url, NULL);
387+
return git_remote_create_with_opts(out, url, NULL);
393388
}
394389

395390
int git_remote_dup(git_remote **dest, git_remote *source)

0 commit comments

Comments
 (0)