Commit 49b3ddf2 by Edward Thomson

rebase: commit should return GIT_EUNMERGED

git_rebase_commit should return `GIT_EUNMERGED` when unmerged items
exist in the index, per the documentation.  Test that this is correct.
parent 30640aa9
......@@ -90,7 +90,7 @@ void test_rebase_merge__next_with_conflicts(void)
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_status_list *status_list;
const git_status_entry *status_entry;
git_oid pick_id;
git_oid pick_id, commit_id;
const char *expected_merge =
"ASPARAGUS SOUP.\n"
......@@ -139,6 +139,8 @@ void test_rebase_merge__next_with_conflicts(void)
cl_assert_equal_file(expected_merge, strlen(expected_merge), "rebase/asparagus.txt");
cl_git_fail_with(GIT_EUNMERGED, git_rebase_commit(&commit_id, rebase, NULL, signature, NULL, NULL));
git_status_list_free(status_list);
git_annotated_commit_free(branch_head);
git_annotated_commit_free(upstream_head);
......
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