Commit 592f466c by Ben Straub

Fix GCC static/non-static compile error

parent 19c3c99c
......@@ -130,7 +130,28 @@ on_error:
return error;
}
extern int ensure_remote_doesnot_exist(git_repository *repo, const char *name);
static int ensure_remote_doesnot_exist(git_repository *repo, const char *name)
{
int error;
git_remote *remote;
error = git_remote_load(&remote, repo, name);
if (error == GIT_ENOTFOUND)
return 0;
if (error < 0)
return error;
git_remote_free(remote);
giterr_set(
GITERR_CONFIG,
"Remote '%s' already exists.", name);
return GIT_EEXISTS;
}
int git_remote_create(git_remote **out, git_repository *repo, const char *name, const char *url)
{
......@@ -1091,28 +1112,6 @@ void git_remote_set_autotag(git_remote *remote, git_remote_autotag_option_t valu
remote->download_tags = value;
}
static int ensure_remote_doesnot_exist(git_repository *repo, const char *name)
{
int error;
git_remote *remote;
error = git_remote_load(&remote, repo, name);
if (error == GIT_ENOTFOUND)
return 0;
if (error < 0)
return error;
git_remote_free(remote);
giterr_set(
GITERR_CONFIG,
"Remote '%s' already exists.", name);
return GIT_EEXISTS;
}
static int rename_remote_config_section(
git_repository *repo,
const char *old_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment