Commit 383fb799ee66b2b50ba80ad1c3cc858cbfd783b7

Ben Straub 2012-07-31T08:51:38

Rename example function to avoid name collision.

diff --git a/examples/network/clone.c b/examples/network/clone.c
index b7ac0fb..fb571bd 100644
--- a/examples/network/clone.c
+++ b/examples/network/clone.c
@@ -32,7 +32,7 @@ static void *clone_thread(void *ptr)
 	pthread_exit(&data->ret);
 }
 
-int clone(git_repository *repo, int argc, char **argv)
+int do_clone(git_repository *repo, int argc, char **argv)
 {
 	struct dl_data data = {0};
 	pthread_t worker;
diff --git a/examples/network/common.h b/examples/network/common.h
index d4b63e7..c82eaa1 100644
--- a/examples/network/common.h
+++ b/examples/network/common.h
@@ -10,6 +10,6 @@ int parse_pkt_line(git_repository *repo, int argc, char **argv);
 int show_remote(git_repository *repo, int argc, char **argv);
 int fetch(git_repository *repo, int argc, char **argv);
 int index_pack(git_repository *repo, int argc, char **argv);
-int clone(git_repository *repo, int argc, char **argv);
+int do_clone(git_repository *repo, int argc, char **argv);
 
 #endif /* __COMMON_H__ */
diff --git a/examples/network/git2.c b/examples/network/git2.c
index 21c8ec9..9f0f43e 100644
--- a/examples/network/git2.c
+++ b/examples/network/git2.c
@@ -12,7 +12,7 @@ struct {
 } commands[] = {
 	{"ls-remote", ls_remote},
 	{"fetch", fetch},
-	{"clone", clone},
+	{"clone", do_clone},
 	{"index-pack", index_pack},
 	{ NULL, NULL}
 };