Rename example function to avoid name collision.
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
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}
};