diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2014-07-22 10:40:23 -0400 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2014-07-22 10:40:23 -0400 |
commit | 0ba4dca52625b54d6b741bd10dce5ef76ebbf1b8 (patch) | |
tree | dfc1be8e3b7b1516eb7103aaecca7644cfc17d50 /tests/cherrypick | |
parent | 091165c53b2bcd5d41fb71d43ed5a23a3d96bf5d (diff) | |
download | libgit2-0ba4dca52625b54d6b741bd10dce5ef76ebbf1b8.tar.gz |
git_cherry_pick -> git_cherrypick
Diffstat (limited to 'tests/cherrypick')
-rw-r--r-- | tests/cherrypick/bare.c | 6 | ||||
-rw-r--r-- | tests/cherrypick/workdir.c | 52 |
2 files changed, 29 insertions, 29 deletions
diff --git a/tests/cherrypick/bare.c b/tests/cherrypick/bare.c index 7ac1054a1..135336507 100644 --- a/tests/cherrypick/bare.c +++ b/tests/cherrypick/bare.c @@ -39,7 +39,7 @@ void test_cherrypick_bare__automerge(void) git_oid_fromstr(&cherry_oid, "cfc4f0999a8367568e049af4f72e452d40828a15"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick_commit(&index, repo, commit, head, 0, NULL)); + cl_git_pass(git_cherrypick_commit(&index, repo, commit, head, 0, NULL)); cl_assert(merge_test_index(index, merge_index_entries, 3)); git_index_free(index); @@ -69,7 +69,7 @@ void test_cherrypick_bare__conflicts(void) git_oid_fromstr(&cherry_oid, "e9b63f3655b2ad80c0ff587389b5a9589a3a7110"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick_commit(&index, repo, commit, head, 0, NULL)); + cl_git_pass(git_cherrypick_commit(&index, repo, commit, head, 0, NULL)); cl_assert(merge_test_index(index, merge_index_entries, 7)); git_index_free(index); @@ -96,7 +96,7 @@ void test_cherrypick_bare__orphan(void) git_oid_fromstr(&cherry_oid, "74f06b5bfec6d33d7264f73606b57a7c0b963819"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick_commit(&index, repo, commit, head, 0, NULL)); + cl_git_pass(git_cherrypick_commit(&index, repo, commit, head, 0, NULL)); cl_assert(merge_test_index(index, merge_index_entries, 4)); git_index_free(index); diff --git a/tests/cherrypick/workdir.c b/tests/cherrypick/workdir.c index 581a5f997..f41d47833 100644 --- a/tests/cherrypick/workdir.c +++ b/tests/cherrypick/workdir.c @@ -36,7 +36,7 @@ void test_cherrypick_workdir__automerge(void) git_signature *signature = NULL; size_t i; - const char *cherry_pick_oids[] = { + const char *cherrypick_oids[] = { "cfc4f0999a8367568e049af4f72e452d40828a15", "964ea3da044d9083181a88ba6701de9e35778bf4", "a43a050c588d4e92f11a6b139680923e9728477d", @@ -62,29 +62,29 @@ void test_cherrypick_workdir__automerge(void) for (i = 0; i < 3; ++i) { git_commit *head = NULL, *commit = NULL; - git_oid cherry_oid, cherry_picked_oid, cherry_picked_tree_oid; - git_tree *cherry_picked_tree = NULL; + git_oid cherry_oid, cherrypicked_oid, cherrypicked_tree_oid; + git_tree *cherrypicked_tree = NULL; cl_git_pass(git_commit_lookup(&head, repo, &head_oid)); cl_git_pass(git_reset(repo, (git_object *)head, GIT_RESET_HARD, NULL, NULL)); - git_oid_fromstr(&cherry_oid, cherry_pick_oids[i]); + git_oid_fromstr(&cherry_oid, cherrypick_oids[i]); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, NULL)); + cl_git_pass(git_cherrypick(repo, commit, NULL)); cl_assert(git_path_exists(TEST_REPO_PATH "/.git/CHERRY_PICK_HEAD")); cl_assert(git_path_exists(TEST_REPO_PATH "/.git/MERGE_MSG")); - cl_git_pass(git_index_write_tree(&cherry_picked_tree_oid, repo_index)); - cl_git_pass(git_tree_lookup(&cherry_picked_tree, repo, &cherry_picked_tree_oid)); - cl_git_pass(git_commit_create(&cherry_picked_oid, repo, "HEAD", signature, signature, NULL, - "Cherry picked!", cherry_picked_tree, 1, (const git_commit **)&head)); + cl_git_pass(git_index_write_tree(&cherrypicked_tree_oid, repo_index)); + cl_git_pass(git_tree_lookup(&cherrypicked_tree, repo, &cherrypicked_tree_oid)); + cl_git_pass(git_commit_create(&cherrypicked_oid, repo, "HEAD", signature, signature, NULL, + "Cherry picked!", cherrypicked_tree, 1, (const git_commit **)&head)); cl_assert(merge_test_index(repo_index, merge_index_entries + i * 3, 3)); - git_oid_cpy(&head_oid, &cherry_picked_oid); + git_oid_cpy(&head_oid, &cherrypicked_oid); - git_tree_free(cherry_picked_tree); + git_tree_free(cherrypicked_tree); git_commit_free(head); git_commit_free(commit); } @@ -118,7 +118,7 @@ void test_cherrypick_workdir__conflicts(void) git_oid_fromstr(&cherry_oid, "e9b63f3655b2ad80c0ff587389b5a9589a3a7110"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, NULL)); + cl_git_pass(git_cherrypick(repo, commit, NULL)); cl_assert(git_path_exists(TEST_REPO_PATH "/.git/CHERRY_PICK_HEAD")); cl_assert(git_path_exists(TEST_REPO_PATH "/.git/MERGE_MSG")); @@ -198,7 +198,7 @@ void test_cherrypick_workdir__conflict_use_ours(void) { git_commit *head = NULL, *commit = NULL; git_oid head_oid, cherry_oid; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" }, @@ -226,7 +226,7 @@ void test_cherrypick_workdir__conflict_use_ours(void) git_oid_fromstr(&cherry_oid, "e9b63f3655b2ad80c0ff587389b5a9589a3a7110"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_index_entries, 7)); cl_assert(merge_test_workdir(repo, merge_filesystem_entries, 3)); @@ -235,7 +235,7 @@ void test_cherrypick_workdir__conflict_use_ours(void) opts.merge_opts.file_favor = GIT_MERGE_FILE_FAVOR_OURS; cl_git_pass(git_reset(repo, (git_object *)head, GIT_RESET_HARD, NULL, NULL)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_filesystem_entries, 3)); cl_assert(merge_test_workdir(repo, merge_filesystem_entries, 3)); @@ -251,7 +251,7 @@ void test_cherrypick_workdir__rename(void) { git_commit *head, *commit; git_oid head_oid, cherry_oid; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "19c5c7207054604b69c84d08a7571ef9672bb5c2", 0, "file1.txt" }, @@ -268,7 +268,7 @@ void test_cherrypick_workdir__rename(void) git_oid_fromstr(&cherry_oid, "2a26c7e88b285613b302ba76712bc998863f3cbc"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_index_entries, 3)); @@ -284,7 +284,7 @@ void test_cherrypick_workdir__both_renamed(void) git_commit *head, *commit; git_oid head_oid, cherry_oid; git_buf mergemsg_buf = GIT_BUF_INIT; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "19c5c7207054604b69c84d08a7571ef9672bb5c2", 0, "file1.txt" }, @@ -303,7 +303,7 @@ void test_cherrypick_workdir__both_renamed(void) git_oid_fromstr(&cherry_oid, "2a26c7e88b285613b302ba76712bc998863f3cbc"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_index_entries, 5)); @@ -326,13 +326,13 @@ void test_cherrypick_workdir__nonmerge_fails_mainline_specified(void) { git_reference *head; git_commit *commit; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; cl_git_pass(git_repository_head(&head, repo)); cl_git_pass(git_reference_peel((git_object **)&commit, head, GIT_OBJ_COMMIT)); opts.mainline = 1; - cl_must_fail(git_cherry_pick(repo, commit, &opts)); + cl_must_fail(git_cherrypick(repo, commit, &opts)); cl_assert(!git_path_exists(TEST_REPO_PATH "/.git/CHERRY_PICK_HEAD")); cl_assert(!git_path_exists(TEST_REPO_PATH "/.git/MERGE_MSG")); @@ -355,7 +355,7 @@ void test_cherrypick_workdir__merge_fails_without_mainline_specified(void) git_oid_fromstr(&cherry_oid, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_must_fail(git_cherry_pick(repo, commit, NULL)); + cl_must_fail(git_cherrypick(repo, commit, NULL)); cl_assert(!git_path_exists(TEST_REPO_PATH "/.git/CHERRY_PICK_HEAD")); cl_assert(!git_path_exists(TEST_REPO_PATH "/.git/MERGE_MSG")); @@ -370,7 +370,7 @@ void test_cherrypick_workdir__merge_first_parent(void) { git_commit *head, *commit; git_oid head_oid, cherry_oid; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "f90f9dcbdac2cce5cc166346160e19cb693ef4e8", 0, "file1.txt" }, @@ -387,7 +387,7 @@ void test_cherrypick_workdir__merge_first_parent(void) git_oid_fromstr(&cherry_oid, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_index_entries, 3)); @@ -402,7 +402,7 @@ void test_cherrypick_workdir__merge_second_parent(void) { git_commit *head, *commit; git_oid head_oid, cherry_oid; - git_cherry_pick_options opts = GIT_CHERRY_PICK_OPTIONS_INIT; + git_cherrypick_options opts = GIT_CHERRYPICK_OPTIONS_INIT; struct merge_index_entry merge_index_entries[] = { { 0100644, "487434cace79238a7091e2220611d4f20a765690", 0, "file1.txt" }, @@ -419,7 +419,7 @@ void test_cherrypick_workdir__merge_second_parent(void) git_oid_fromstr(&cherry_oid, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff"); cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid)); - cl_git_pass(git_cherry_pick(repo, commit, &opts)); + cl_git_pass(git_cherrypick(repo, commit, &opts)); cl_assert(merge_test_index(repo_index, merge_index_entries, 3)); |