Unverified Commit fd4e3b21 by Edward Thomson Committed by GitHub

Merge pull request #4885 from pks-t/pks/apply-test-fixups

apply: small fixups in the test suite
parents cf83809b afc64bcd
......@@ -244,7 +244,7 @@ void test_apply_both__application_failure_leaves_workdir_unmodified(void)
"This is a modification.\n");
cl_git_pass(git_repository_index(&index, repo));
git_index_add_bypath(index, "veal.txt");
cl_git_pass(git_index_add_bypath(index, "veal.txt"));
cl_git_pass(git_index_write(index));
git_index_free(index);
......@@ -291,7 +291,7 @@ void test_apply_both__keeps_nonconflicting_changes(void)
idx_entry.mode = 0100644;
idx_entry.path = "beef.txt";
cl_git_pass(git_oid_fromstr(&idx_entry.id, "898d12687fb35be271c27c795a6b32c8b51da79e"));
git_index_add(index, &idx_entry);
cl_git_pass(git_index_add(index, &idx_entry));
cl_git_pass(git_index_remove(index, "bouilli.txt", 0));
cl_git_pass(git_index_write(index));
......@@ -337,7 +337,7 @@ void test_apply_both__can_apply_nonconflicting_file_changes(void)
"This line is added in the index and the workdir.\n");
cl_git_pass(git_repository_index(&index, repo));
git_index_add_bypath(index, "asparagus.txt");
cl_git_pass(git_index_add_bypath(index, "asparagus.txt"));
cl_git_pass(git_index_write(index));
git_index_free(index);
......
......@@ -104,8 +104,8 @@ static int apply_buf(
}
git__free(filename);
git_buf_free(&result);
git_buf_free(&patchbuf);
git_buf_dispose(&result);
git_buf_dispose(&patchbuf);
git_patch_free(patch);
return error;
......
......@@ -167,7 +167,7 @@ void test_apply_workdir__modified_index_with_unmodified_workdir_is_ok(void)
sizeof(struct merge_index_entry);
/* mutate the index and leave the workdir matching HEAD */
git_repository_index(&index, repo);
cl_git_pass(git_repository_index(&index, repo));
idx_entry.mode = 0100644;
idx_entry.path = "veal.txt";
......
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