Commit b3fb9237c215e9a0e2e042afd9252d541ce40541

Russell Belfer 2013-01-02T17:12:45

Clone should use GIT_CHECKOUT_SAFE_CREATE For clone to work as expected, it should be using a SAFE_CREATE checkout (i.e. create files that are missing, even if the target tree matches the current HEAD).

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests-clar/online/clone.c b/tests-clar/online/clone.c
index c216a1e..082ed52 100644
--- a/tests-clar/online/clone.c
+++ b/tests-clar/online/clone.c
@@ -91,7 +91,7 @@ void test_online_clone__can_checkout_a_cloned_repo(void)
 	bool checkout_progress_cb_was_called = false,
 		  fetch_progress_cb_was_called = false;
 
-	g_options.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
+	g_options.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE;
 	g_options.checkout_opts.progress_cb = &checkout_progress;
 	g_options.checkout_opts.progress_payload = &checkout_progress_cb_was_called;
 	g_options.fetch_progress_cb = &fetch_progress;