summaryrefslogtreecommitdiff
path: root/examples/network/clone.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2013-01-23 17:38:00 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2013-01-23 17:38:00 -0600
commitc27e211219574324ef9eaf7980b04e5e08189169 (patch)
treeeefc9714fbc603383a438458a3c280905ae81444 /examples/network/clone.c
parent0d52cb4aea2e0af1b8a4a8557e26c9edf85c96db (diff)
downloadlibgit2-c27e211219574324ef9eaf7980b04e5e08189169.tar.gz
update examples to work on windows
Diffstat (limited to 'examples/network/clone.c')
-rw-r--r--examples/network/clone.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/network/clone.c b/examples/network/clone.c
index 9b323ff73..63072eea0 100644
--- a/examples/network/clone.c
+++ b/examples/network/clone.c
@@ -4,8 +4,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <pthread.h>
-#include <unistd.h>
+#ifndef _WIN32
+# include <pthread.h>
+# include <unistd.h>
+#endif
/* Shamelessly borrowed from http://stackoverflow.com/questions/3417837/ */
#ifdef UNUSED
@@ -94,7 +96,7 @@ int do_clone(git_repository *repo, int argc, char **argv)
}
// Set up options
- checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
+ checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
checkout_opts.progress_cb = checkout_progress;
checkout_opts.progress_payload = &pd;
clone_opts.checkout_opts = checkout_opts;