Commit 592f466c48a45ee8b9ba1057294a9cb849c729fa

Ben Straub 2012-12-27T11:11:53

Fix GCC static/non-static compile error

diff --git a/src/remote.c b/src/remote.c
index 5384db6..d874d60 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -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,