diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-03-04 23:55:42 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-11 14:12:19 -0400 |
commit | f0957589ee57cf5a98e4aa3ce742fb68c3e36f19 (patch) | |
tree | ff10fdc5bbc4620986d4fac96f880a09d388b4b4 /tests/stash | |
parent | 90f8408dacf0da9def636a042813822b078df735 (diff) | |
download | libgit2-f0957589ee57cf5a98e4aa3ce742fb68c3e36f19.tar.gz |
stash: refactor to use merge_iterators
Diffstat (limited to 'tests/stash')
-rw-r--r-- | tests/stash/apply.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/stash/apply.c b/tests/stash/apply.c index c0cdcabb9..efe7852b8 100644 --- a/tests/stash/apply.c +++ b/tests/stash/apply.c @@ -63,7 +63,7 @@ void test_stash_apply__cleanup(void) void test_stash_apply__with_default(void) { - cl_git_pass(git_stash_apply(repo, 0, GIT_APPLY_DEFAULT)); + cl_git_pass(git_stash_apply(repo, 0, NULL, GIT_APPLY_DEFAULT)); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); @@ -74,7 +74,7 @@ void test_stash_apply__with_default(void) void test_stash_apply__with_reinstate_index(void) { - cl_git_pass(git_stash_apply(repo, 0, GIT_APPLY_REINSTATE_INDEX)); + cl_git_pass(git_stash_apply(repo, 0, NULL, GIT_APPLY_REINSTATE_INDEX)); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); @@ -93,7 +93,7 @@ void test_stash_apply__conflict_index_with_default(void) cl_git_pass(git_index_add_bypath(repo_index, "who")); cl_git_pass(git_index_write(repo_index)); - cl_git_pass(git_stash_apply(repo, 0, GIT_APPLY_DEFAULT)); + cl_git_pass(git_stash_apply(repo, 0, NULL, GIT_APPLY_DEFAULT)); cl_assert_equal_i(git_index_has_conflicts(repo_index), 1); assert_status(repo, "what", GIT_STATUS_INDEX_MODIFIED); @@ -108,7 +108,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, GIT_APPLY_REINSTATE_INDEX), GIT_EUNMERGED); + cl_git_fail_with(git_stash_apply(repo, 0, NULL, GIT_APPLY_REINSTATE_INDEX), GIT_EUNMERGED); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -121,7 +121,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, GIT_APPLY_DEFAULT), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, NULL, GIT_APPLY_DEFAULT), GIT_EMERGECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -134,7 +134,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, GIT_APPLY_REINSTATE_INDEX), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, NULL, GIT_APPLY_REINSTATE_INDEX), GIT_EMERGECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_CURRENT); @@ -147,7 +147,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, GIT_APPLY_DEFAULT), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, NULL, GIT_APPLY_DEFAULT), GIT_EMERGECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); @@ -160,7 +160,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, GIT_APPLY_REINSTATE_INDEX), GIT_EMERGECONFLICT); + cl_git_fail_with(git_stash_apply(repo, 0, NULL, GIT_APPLY_REINSTATE_INDEX), GIT_EMERGECONFLICT); cl_assert_equal_i(git_index_has_conflicts(repo_index), 0); assert_status(repo, "what", GIT_STATUS_WT_MODIFIED); @@ -179,7 +179,7 @@ void test_stash_apply__conflict_commit_with_default(void) cl_git_pass(git_index_add_bypath(repo_index, "what")); cl_repo_commit_from_index(NULL, repo, signature, 0, "Other commit"); - cl_git_pass(git_stash_apply(repo, 0, GIT_APPLY_DEFAULT)); + cl_git_pass(git_stash_apply(repo, 0, NULL, GIT_APPLY_DEFAULT)); cl_assert_equal_i(git_index_has_conflicts(repo_index), 1); cl_git_pass(git_index_conflict_get(&ancestor, &our, &their, repo_index, "what")); /* unmerged */ @@ -198,7 +198,7 @@ void test_stash_apply__conflict_commit_with_reinstate_index(void) cl_git_pass(git_index_add_bypath(repo_index, "what")); cl_repo_commit_from_index(NULL, repo, signature, 0, "Other commit"); - cl_git_pass(git_stash_apply(repo, 0, GIT_APPLY_REINSTATE_INDEX)); + cl_git_pass(git_stash_apply(repo, 0, NULL, GIT_APPLY_REINSTATE_INDEX)); cl_assert_equal_i(git_index_has_conflicts(repo_index), 1); cl_git_pass(git_index_conflict_get(&ancestor, &our, &their, repo_index, "what")); /* unmerged */ @@ -209,7 +209,7 @@ void test_stash_apply__conflict_commit_with_reinstate_index(void) void test_stash_apply__pop(void) { - cl_git_pass(git_stash_pop(repo, 0, GIT_APPLY_DEFAULT)); + cl_git_pass(git_stash_pop(repo, 0, NULL, GIT_APPLY_DEFAULT)); - cl_git_fail_with(git_stash_pop(repo, 0, GIT_APPLY_DEFAULT), GIT_ENOTFOUND); + cl_git_fail_with(git_stash_pop(repo, 0, NULL, GIT_APPLY_DEFAULT), GIT_ENOTFOUND); } |