diff options
author | Ben Straub <bs@github.com> | 2014-01-04 05:38:34 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2014-03-06 21:44:51 +0400 |
commit | 6affd71f33f9a9693425d6f3599ba1f25226c34b (patch) | |
tree | 42127170b47c96ec55438920e812dc0d96568add /tests/checkout | |
parent | 8e5247203720de7abd084996c00afd6fb6f6cc21 (diff) |
git_checkout_opts -> git_checkout_options
Diffstat (limited to 'tests/checkout')
-rw-r--r-- | tests/checkout/binaryunicode.c | 2 | ||||
-rw-r--r-- | tests/checkout/conflict.c | 34 | ||||
-rw-r--r-- | tests/checkout/crlf.c | 49 | ||||
-rw-r--r-- | tests/checkout/head.c | 2 | ||||
-rw-r--r-- | tests/checkout/index.c | 46 | ||||
-rw-r--r-- | tests/checkout/tree.c | 36 | ||||
-rw-r--r-- | tests/checkout/typechange.c | 4 |
7 files changed, 99 insertions, 74 deletions
diff --git a/tests/checkout/binaryunicode.c b/tests/checkout/binaryunicode.c index 14ab9fdfa..1172816c7 100644 --- a/tests/checkout/binaryunicode.c +++ b/tests/checkout/binaryunicode.c @@ -21,7 +21,7 @@ static void execute_test(void) git_oid oid, check; git_commit *commit; git_tree *tree; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/branch1")); cl_git_pass(git_commit_lookup(&commit, g_repo, &oid)); diff --git a/tests/checkout/conflict.c b/tests/checkout/conflict.c index 2fea511da..2cb7c224d 100644 --- a/tests/checkout/conflict.c +++ b/tests/checkout/conflict.c @@ -207,7 +207,7 @@ static void ensure_workdir_link(const char *path, const char *target) void test_checkout_conflict__ignored(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy |= GIT_CHECKOUT_SKIP_UNMERGED; @@ -221,7 +221,7 @@ void test_checkout_conflict__ignored(void) void test_checkout_conflict__ours(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy |= GIT_CHECKOUT_USE_OURS; @@ -234,7 +234,7 @@ void test_checkout_conflict__ours(void) void test_checkout_conflict__theirs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy |= GIT_CHECKOUT_USE_THEIRS; @@ -248,7 +248,7 @@ void test_checkout_conflict__theirs(void) void test_checkout_conflict__diff3(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; create_conflicting_index(); @@ -259,7 +259,7 @@ void test_checkout_conflict__diff3(void) void test_checkout_conflict__automerge(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, AUTOMERGEABLE_ANCESTOR_OID, 1, "automergeable.txt" }, @@ -277,7 +277,7 @@ void test_checkout_conflict__automerge(void) void test_checkout_conflict__directory_file(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_ANCESTOR_OID, 1, "df-1" }, @@ -316,7 +316,7 @@ void test_checkout_conflict__directory_file(void) void test_checkout_conflict__directory_file_with_custom_labels(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_ANCESTOR_OID, 1, "df-1" }, @@ -357,7 +357,7 @@ void test_checkout_conflict__directory_file_with_custom_labels(void) void test_checkout_conflict__link_file(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_ANCESTOR_OID, 1, "link-1" }, @@ -393,7 +393,7 @@ void test_checkout_conflict__link_file(void) void test_checkout_conflict__links(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0120000, LINK_ANCESTOR_OID, 1, "link-1" }, @@ -418,7 +418,7 @@ void test_checkout_conflict__links(void) void test_checkout_conflict__add_add(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_OURS_OID, 2, "conflicting.txt" }, @@ -438,7 +438,7 @@ void test_checkout_conflict__add_add(void) void test_checkout_conflict__mode_change(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, CONFLICTING_ANCESTOR_OID, 1, "executable-1" }, @@ -495,7 +495,7 @@ void test_checkout_conflict__mode_change(void) void test_checkout_conflict__renames(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, "68c6c84b091926c7d90aa6a79b2bc3bb6adccd8e", 0, "0a-no-change.txt" }, @@ -680,7 +680,7 @@ void test_checkout_conflict__renames(void) void test_checkout_conflict__rename_keep_ours(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, "68c6c84b091926c7d90aa6a79b2bc3bb6adccd8e", 0, "0a-no-change.txt" }, @@ -847,7 +847,7 @@ void test_checkout_conflict__rename_keep_ours(void) void test_checkout_conflict__name_mangled_file_exists_in_workdir(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, "b42712cfe99a1a500b2a51fe984e0b8a7702ba11", 1, "test-one-side-one.txt" }, @@ -987,7 +987,7 @@ void test_checkout_conflict__name_mangled_file_exists_in_workdir(void) void test_checkout_conflict__update_only(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct checkout_index_entry checkout_index_entries[] = { { 0100644, AUTOMERGEABLE_ANCESTOR_OID, 1, "automergeable.txt" }, @@ -1032,7 +1032,7 @@ void test_checkout_conflict__update_only(void) void test_checkout_conflict__path_filters(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; char *paths[] = { "conflicting-1.txt", "conflicting-3.txt" }; git_strarray patharray = {0}; @@ -1089,7 +1089,7 @@ static void collect_progress( void test_checkout_conflict__report_progress(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_vector paths = GIT_VECTOR_INIT; char *path; size_t i; diff --git a/tests/checkout/crlf.c b/tests/checkout/crlf.c index 0d78ee039..6b2c1b122 100644 --- a/tests/checkout/crlf.c +++ b/tests/checkout/crlf.c @@ -18,11 +18,24 @@ void test_checkout_crlf__cleanup(void) cl_git_sandbox_cleanup(); } +void test_checkout_crlf__detect_crlf_autocrlf_false(void) +{ + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; + opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; + + cl_repo_set_bool(g_repo, "core.autocrlf", false); + + git_checkout_head(g_repo, &opts); + + check_file_contents("./crlf/all-lf", ALL_LF_TEXT_RAW); + check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW); +} + void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void) { git_index *index; const git_index_entry *entry; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", false); @@ -42,7 +55,7 @@ void test_checkout_crlf__autocrlf_false_index_size_is_unfiltered_size(void) void test_checkout_crlf__detect_crlf_autocrlf_true(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -59,7 +72,7 @@ void test_checkout_crlf__detect_crlf_autocrlf_true(void) void test_checkout_crlf__more_lf_autocrlf_true(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -74,7 +87,7 @@ void test_checkout_crlf__more_lf_autocrlf_true(void) void test_checkout_crlf__more_crlf_autocrlf_true(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -87,11 +100,23 @@ void test_checkout_crlf__more_crlf_autocrlf_true(void) check_file_contents("./crlf/more-crlf", MORE_CRLF_TEXT_AS_CRLF); } +void test_checkout_crlf__all_crlf_autocrlf_true(void) +{ + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; + opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; + + cl_repo_set_bool(g_repo, "core.autocrlf", true); + + git_checkout_head(g_repo, &opts); + + check_file_contents("./crlf/all-crlf", ALL_CRLF_TEXT_RAW); +} + void test_checkout_crlf__autocrlf_true_index_size_is_filtered_size(void) { git_index *index; const git_index_entry *entry; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -117,7 +142,7 @@ void test_checkout_crlf__with_ident(void) { git_index *index; git_blob *blob; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_git_mkfile("crlf/.gitattributes", @@ -207,7 +232,7 @@ void test_checkout_crlf__with_ident(void) void test_checkout_crlf__autocrlf_false_no_attrs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", false); @@ -220,7 +245,7 @@ void test_checkout_crlf__autocrlf_false_no_attrs(void) void test_checkout_crlf__autocrlf_true_no_attrs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -238,7 +263,7 @@ void test_checkout_crlf__autocrlf_true_no_attrs(void) void test_checkout_crlf__autocrlf_input_no_attrs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_repo_set_string(g_repo, "core.autocrlf", "input"); @@ -251,7 +276,7 @@ void test_checkout_crlf__autocrlf_input_no_attrs(void) void test_checkout_crlf__autocrlf_false_text_auto_attr(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n"); @@ -266,7 +291,7 @@ void test_checkout_crlf__autocrlf_false_text_auto_attr(void) void test_checkout_crlf__autocrlf_true_text_auto_attr(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n"); @@ -286,7 +311,7 @@ void test_checkout_crlf__autocrlf_true_text_auto_attr(void) void test_checkout_crlf__autocrlf_input_text_auto_attr(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; cl_git_mkfile("./crlf/.gitattributes", "* text=auto\n"); diff --git a/tests/checkout/head.c b/tests/checkout/head.c index a7a7e9071..07cc1d209 100644 --- a/tests/checkout/head.c +++ b/tests/checkout/head.c @@ -25,7 +25,7 @@ void test_checkout_head__unborn_head_returns_GIT_EUNBORNBRANCH(void) void test_checkout_head__with_index_only_tree(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_index *index; /* let's start by getting things into a known state */ diff --git a/tests/checkout/index.c b/tests/checkout/index.c index 57ce4313b..7f641b329 100644 --- a/tests/checkout/index.c +++ b/tests/checkout/index.c @@ -43,7 +43,7 @@ void test_checkout_index__cannot_checkout_a_bare_repository(void) void test_checkout_index__can_create_missing_files(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_assert_equal_i(false, git_path_isfile("./testrepo/README")); cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt")); @@ -60,7 +60,7 @@ void test_checkout_index__can_create_missing_files(void) void test_checkout_index__can_remove_untracked_files(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_futils_mkdir("./testrepo/dir/subdir/subsubdir", NULL, 0755, GIT_MKDIR_PATH); cl_git_mkfile("./testrepo/dir/one", "one\n"); @@ -78,7 +78,7 @@ void test_checkout_index__can_remove_untracked_files(void) void test_checkout_index__honor_the_specified_pathspecs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; char *entries[] = { "*.txt" }; opts.paths.strings = entries; @@ -99,7 +99,7 @@ void test_checkout_index__honor_the_specified_pathspecs(void) void test_checkout_index__honor_the_gitattributes_directives(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; const char *attributes = "branch_file.txt text eol=crlf\n" "new.txt text eol=lf\n"; @@ -119,7 +119,7 @@ void test_checkout_index__honor_the_gitattributes_directives(void) void test_checkout_index__honor_coreautocrlf_setting_set_to_true(void) { #ifdef GIT_WIN32 - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; const char *expected_readme_text = "hey there\r\n"; cl_git_pass(p_unlink("./testrepo/.gitattributes")); @@ -135,7 +135,7 @@ void test_checkout_index__honor_coreautocrlf_setting_set_to_true(void) void test_checkout_index__honor_coresymlinks_setting_set_to_true(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_repo_set_bool(g_repo, "core.symlinks", true); @@ -161,7 +161,7 @@ void test_checkout_index__honor_coresymlinks_setting_set_to_true(void) void test_checkout_index__honor_coresymlinks_setting_set_to_false(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_repo_set_bool(g_repo, "core.symlinks", false); @@ -174,7 +174,7 @@ void test_checkout_index__honor_coresymlinks_setting_set_to_false(void) void test_checkout_index__donot_overwrite_modified_file_by_default(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!"); @@ -190,7 +190,7 @@ void test_checkout_index__donot_overwrite_modified_file_by_default(void) void test_checkout_index__can_overwrite_modified_file(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!"); @@ -203,7 +203,7 @@ void test_checkout_index__can_overwrite_modified_file(void) void test_checkout_index__options_disable_filters(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_mkfile("./testrepo/.gitattributes", "*.txt text eol=crlf\n"); @@ -224,7 +224,7 @@ void test_checkout_index__options_disable_filters(void) void test_checkout_index__options_dir_modes(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct stat st; git_oid oid; git_commit *commit; @@ -258,7 +258,7 @@ void test_checkout_index__options_dir_modes(void) void test_checkout_index__options_override_file_modes(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct stat st; if (!cl_is_chmod_supported()) @@ -275,7 +275,7 @@ void test_checkout_index__options_override_file_modes(void) void test_checkout_index__options_open_flags(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_mkfile("./testrepo/new.txt", "hi\n"); @@ -315,7 +315,7 @@ static int test_checkout_notify_cb( void test_checkout_index__can_notify_of_skipped_files(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; struct notify_data data; cl_git_mkfile("./testrepo/new.txt", "This isn't what's stored!"); @@ -360,7 +360,7 @@ static int dont_notify_cb( void test_checkout_index__wont_notify_of_expected_line_ending_changes(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_git_pass(p_unlink("./testrepo/.gitattributes")); cl_repo_set_bool(g_repo, "core.autocrlf", true); @@ -385,7 +385,7 @@ static void checkout_progress_counter( void test_checkout_index__calls_progress_callback(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; int calls = 0; opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; @@ -398,7 +398,7 @@ void test_checkout_index__calls_progress_callback(void) void test_checkout_index__can_overcome_name_clashes(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_index *index; cl_git_pass(git_repository_index(&index, g_repo)); @@ -440,7 +440,7 @@ void test_checkout_index__can_overcome_name_clashes(void) void test_checkout_index__validates_struct_version(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; const git_error *err; opts.version = 1024; @@ -459,7 +459,7 @@ void test_checkout_index__validates_struct_version(void) void test_checkout_index__can_update_prefixed_files(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_assert_equal_i(false, git_path_isfile("./testrepo/README")); cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt")); @@ -502,7 +502,7 @@ void test_checkout_index__can_checkout_a_newly_initialized_repository(void) void test_checkout_index__issue_1397(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; test_checkout_index__cleanup(); @@ -519,7 +519,7 @@ void test_checkout_index__issue_1397(void) void test_checkout_index__target_directory(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; checkout_counts cts; memset(&cts, 0, sizeof(cts)); @@ -551,7 +551,7 @@ void test_checkout_index__target_directory(void) void test_checkout_index__target_directory_from_bare(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_index *index; git_object *head = NULL; checkout_counts cts; @@ -600,7 +600,7 @@ void test_checkout_index__target_directory_from_bare(void) void test_checkout_index__can_get_repo_from_index(void) { git_index *index; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; cl_assert_equal_i(false, git_path_isfile("./testrepo/README")); cl_assert_equal_i(false, git_path_isfile("./testrepo/branch_file.txt")); diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c index f433b2698..b61ef2dfc 100644 --- a/tests/checkout/tree.c +++ b/tests/checkout/tree.c @@ -7,14 +7,14 @@ #include "fileops.h" static git_repository *g_repo; -static git_checkout_opts g_opts; +static git_checkout_options g_opts; static git_object *g_object; void test_checkout_tree__initialize(void) { g_repo = cl_git_sandbox_init("testrepo"); - GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTS_VERSION); + GIT_INIT_STRUCTURE(&g_opts, GIT_CHECKOUT_OPTIONS_VERSION); g_opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; } @@ -128,7 +128,7 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void) git_oid chomped_oid; git_commit* p_master_commit; git_commit* p_chomped_commit; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid_fromstr(&master_oid, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750"); git_oid_fromstr(&chomped_oid, "e90810b8df3e80c413d903f631643c716887138d"); @@ -148,7 +148,7 @@ void test_checkout_tree__doesnt_write_unrequested_files_to_worktree(void) void test_checkout_tree__can_switch_branches(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -202,7 +202,7 @@ void test_checkout_tree__can_switch_branches(void) void test_checkout_tree__can_remove_untracked(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_REMOVE_UNTRACKED; @@ -216,7 +216,7 @@ void test_checkout_tree__can_remove_untracked(void) void test_checkout_tree__can_remove_ignored(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; int ignored = 0; opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_REMOVE_IGNORED; @@ -239,7 +239,7 @@ static int checkout_tree_with_blob_ignored_in_workdir(int strategy, bool isdir) { git_oid oid; git_object *obj = NULL; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; int ignored = 0, error; assert_on_branch(g_repo, "master"); @@ -344,7 +344,7 @@ void test_checkout_tree__can_overwrite_ignored_folder_by_default(void) void test_checkout_tree__can_update_only(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -554,7 +554,7 @@ void test_checkout_tree__checking_out_a_conflicting_content_change_returns_EMERG void test_checkout_tree__donot_update_deleted_file_by_default(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid old_id, new_id; git_commit *old_commit = NULL, *new_commit = NULL; git_index *index = NULL; @@ -622,7 +622,7 @@ static int checkout_cancel_cb( void test_checkout_tree__can_cancel_checkout_from_notify(void) { struct checkout_cancel_at ca; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -674,7 +674,7 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void) void test_checkout_tree__can_checkout_with_last_workdir_item_missing(void) { git_index *index = NULL; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid tree_id, commit_id; git_tree *tree = NULL; git_commit *commit = NULL; @@ -710,7 +710,7 @@ void test_checkout_tree__can_checkout_with_last_workdir_item_missing(void) void test_checkout_tree__issue_1397(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; const char *partial_oid = "8a7ef04"; git_object *tree = NULL; @@ -733,7 +733,7 @@ void test_checkout_tree__issue_1397(void) void test_checkout_tree__can_write_to_empty_dirs(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -759,7 +759,7 @@ void test_checkout_tree__can_write_to_empty_dirs(void) void test_checkout_tree__fails_when_dir_in_use(void) { #ifdef GIT_WIN32 - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -792,7 +792,7 @@ void test_checkout_tree__fails_when_dir_in_use(void) void test_checkout_tree__can_continue_when_dir_in_use(void) { #ifdef GIT_WIN32 - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -825,7 +825,7 @@ void test_checkout_tree__can_continue_when_dir_in_use(void) void test_checkout_tree__target_directory_from_bare(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; checkout_counts cts; memset(&cts, 0, sizeof(cts)); @@ -910,7 +910,7 @@ static void create_conflict(void) void test_checkout_tree__fails_when_conflicts_exist_in_index(void) { - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_oid oid; git_object *obj = NULL; @@ -930,7 +930,7 @@ void test_checkout_tree__filemode_preserved_in_index(void) { git_oid executable_oid; git_commit *commit; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; git_index *index; const git_index_entry *entry; diff --git a/tests/checkout/typechange.c b/tests/checkout/typechange.c index d88864cf3..7aa14b36d 100644 --- a/tests/checkout/typechange.c +++ b/tests/checkout/typechange.c @@ -107,7 +107,7 @@ void test_checkout_typechange__checkout_typechanges_safe(void) { int i; git_object *obj; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; for (i = 0; g_typechange_oids[i] != NULL; ++i) { cl_git_pass(git_revparse_single(&obj, g_repo, g_typechange_oids[i])); @@ -194,7 +194,7 @@ void test_checkout_typechange__checkout_with_conflicts(void) { int i; git_object *obj; - git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; notify_counts cts = {0}; opts.notify_flags = |