Commit 496b76d4 by Edward Thomson

checkout tests: just use SAFE where appropriate

parent 96b82b11
...@@ -15,8 +15,7 @@ void test_checkout_tree__initialize(void) ...@@ -15,8 +15,7 @@ void test_checkout_tree__initialize(void)
g_repo = cl_git_sandbox_init("testrepo"); g_repo = cl_git_sandbox_init("testrepo");
GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTIONS_VERSION); GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTIONS_VERSION);
g_opts.checkout_strategy = GIT_CHECKOUT_SAFE | g_opts.checkout_strategy = GIT_CHECKOUT_FORCE;
GIT_CHECKOUT_RECREATE_MISSING;
} }
void test_checkout_tree__cleanup(void) void test_checkout_tree__cleanup(void)
...@@ -409,8 +408,7 @@ void test_checkout_tree__can_checkout_with_pattern(void) ...@@ -409,8 +408,7 @@ void test_checkout_tree__can_checkout_with_pattern(void)
/* now to a narrow patterned checkout */ /* now to a narrow patterned checkout */
g_opts.checkout_strategy = GIT_CHECKOUT_SAFE | g_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
GIT_CHECKOUT_RECREATE_MISSING;
g_opts.paths.strings = entries; g_opts.paths.strings = entries;
g_opts.paths.count = 1; g_opts.paths.count = 1;
...@@ -448,7 +446,6 @@ void test_checkout_tree__can_disable_pattern_match(void) ...@@ -448,7 +446,6 @@ void test_checkout_tree__can_disable_pattern_match(void)
g_opts.checkout_strategy = g_opts.checkout_strategy =
GIT_CHECKOUT_SAFE | GIT_CHECKOUT_SAFE |
GIT_CHECKOUT_RECREATE_MISSING |
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH; GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH;
g_opts.paths.strings = entries; g_opts.paths.strings = entries;
g_opts.paths.count = 1; g_opts.paths.count = 1;
...@@ -461,8 +458,7 @@ void test_checkout_tree__can_disable_pattern_match(void) ...@@ -461,8 +458,7 @@ void test_checkout_tree__can_disable_pattern_match(void)
/* let's try that again, but allow the pattern match */ /* let's try that again, but allow the pattern match */
g_opts.checkout_strategy = GIT_CHECKOUT_SAFE | g_opts.checkout_strategy = GIT_CHECKOUT_SAFE;
GIT_CHECKOUT_RECREATE_MISSING;
cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts)); cl_git_pass(git_checkout_tree(g_repo, g_object, &g_opts));
......
...@@ -212,8 +212,7 @@ void test_checkout_typechange__checkout_with_conflicts(void) ...@@ -212,8 +212,7 @@ void test_checkout_typechange__checkout_with_conflicts(void)
p_mkdir("typechanges/d", 0777); /* intentionally empty dir */ p_mkdir("typechanges/d", 0777); /* intentionally empty dir */
force_create_file("typechanges/untracked"); force_create_file("typechanges/untracked");
opts.checkout_strategy = GIT_CHECKOUT_SAFE | opts.checkout_strategy = GIT_CHECKOUT_SAFE;
GIT_CHECKOUT_RECREATE_MISSING;
memset(&cts, 0, sizeof(cts)); memset(&cts, 0, sizeof(cts));
cl_git_fail(git_checkout_tree(g_repo, obj, &opts)); cl_git_fail(git_checkout_tree(g_repo, obj, &opts));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment