diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-05-28 15:26:13 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 09:55:09 -0400 |
commit | 885b94aac06f17c55bd6f8df318e0cffb0104efa (patch) | |
tree | d5e0713a5868f230242db3a614eb08fd11ddbd95 /tests | |
parent | ff8d635adbf1208927c7319178d29b0ed973a107 (diff) | |
download | libgit2-885b94aac06f17c55bd6f8df318e0cffb0104efa.tar.gz |
Rename GIT_EMERGECONFLICT to GIT_ECONFLICT
We do not error on "merge conflicts"; on the contrary, merge conflicts
are a normal part of merging. We only error on "checkout conflicts",
where a change exists in the index or the working directory that would
otherwise be overwritten by performing the checkout.
This *may* happen during merge (after the production of the new index
that we're going to checkout) but it could happen during any checkout.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checkout/tree.c | 14 | ||||
-rw-r--r-- | tests/stash/apply.c | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c index 462323186..be4019822 100644 --- a/tests/checkout/tree.c +++ b/tests/checkout/tree.c @@ -306,7 +306,7 @@ void test_checkout_tree__conflict_on_ignored_when_not_overwriting(void) cl_git_fail(error = checkout_tree_with_blob_ignored_in_workdir( GIT_CHECKOUT_SAFE | GIT_CHECKOUT_DONT_OVERWRITE_IGNORED, false)); - cl_assert_equal_i(GIT_EMERGECONFLICT, error); + cl_assert_equal_i(GIT_ECONFLICT, error); } void test_checkout_tree__can_overwrite_ignored_by_default(void) @@ -327,7 +327,7 @@ void test_checkout_tree__conflict_on_ignored_folder_when_not_overwriting(void) cl_git_fail(error = checkout_tree_with_blob_ignored_in_workdir( GIT_CHECKOUT_SAFE | GIT_CHECKOUT_DONT_OVERWRITE_IGNORED, true)); - cl_assert_equal_i(GIT_EMERGECONFLICT, error); + cl_assert_equal_i(GIT_ECONFLICT, error); } void test_checkout_tree__can_overwrite_ignored_folder_by_default(void) @@ -512,7 +512,7 @@ void assert_conflict( g_opts.checkout_strategy = GIT_CHECKOUT_SAFE; cl_assert_equal_i( - GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts)); + GIT_ECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts)); /* Stage the conflicting change */ cl_git_pass(git_index_add_bypath(index, entry_path)); @@ -520,10 +520,10 @@ void assert_conflict( git_index_free(index); cl_assert_equal_i( - GIT_EMERGECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts)); + GIT_ECONFLICT, git_checkout_tree(g_repo, g_object, &g_opts)); } -void test_checkout_tree__checking_out_a_conflicting_type_change_returns_EMERGECONFLICT(void) +void test_checkout_tree__checking_out_a_conflicting_type_change_returns_ECONFLICT(void) { /* * 099faba adds a symlink named 'link_to_new.txt' @@ -533,7 +533,7 @@ void test_checkout_tree__checking_out_a_conflicting_type_change_returns_EMERGECO assert_conflict("link_to_new.txt", "old.txt", "a65fedf", "099faba"); } -void test_checkout_tree__checking_out_a_conflicting_type_change_returns_EMERGECONFLICT_2(void) +void test_checkout_tree__checking_out_a_conflicting_type_change_returns_ECONFLICT_2(void) { /* * cf80f8d adds a directory named 'a/' @@ -543,7 +543,7 @@ void test_checkout_tree__checking_out_a_conflicting_type_change_returns_EMERGECO assert_conflict("a", "hello\n", "a4a7dce", "cf80f8d"); } -void test_checkout_tree__checking_out_a_conflicting_content_change_returns_EMERGECONFLICT(void) +void test_checkout_tree__checking_out_a_conflicting_content_change_returns_ECONFLICT(void) { /* * c47800c adds a symlink named 'branch_file.txt' diff --git a/tests/stash/apply.c b/tests/stash/apply.c index 42186b6fb..e9b56f8c6 100644 --- a/tests/stash/apply.c +++ b/tests/stash/apply.c @@ -118,7 +118,7 @@ void test_stash_apply__conflict_index_with_reinstate_index(void) cl_git_pass(git_index_add_bypath(repo_index, "who")); cl_git_pass(git_index_write(repo_index)); - cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_ECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -133,7 +133,7 @@ void test_stash_apply__conflict_untracked_with_default(void) cl_git_mkfile("stash/when", "nothing\n"); - cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_ECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -150,7 +150,7 @@ void test_stash_apply__conflict_untracked_with_reinstate_index(void) cl_git_mkfile("stash/when", "nothing\n"); - cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_ECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -163,7 +163,7 @@ void test_stash_apply__conflict_workdir_with_default(void) { cl_git_rewritefile("stash/what", "ciao\n"); - cl_git_fail_with(git_stash_apply(repo, 0, NULL), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, NULL), GIT_ECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); @@ -180,7 +180,7 @@ void test_stash_apply__conflict_workdir_with_reinstate_index(void) cl_git_rewritefile("stash/what", "ciao\n"); - cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, &opts), GIT_ECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); |