Added cherry pick tests

This commit is contained in:
Jacques Germishuys
2014-04-02 13:57:11 +02:00
parent 4d7b993904
commit 103b7d2122
92 changed files with 631 additions and 0 deletions

106
tests/cherrypick/bare.c Normal file
View File

@@ -0,0 +1,106 @@
#include "clar.h"
#include "clar_libgit2.h"
#include "buffer.h"
#include "fileops.h"
#include "git2/cherrypick.h"
#include "../merge/merge_helpers.h"
#define TEST_REPO_PATH "cherrypick"
static git_repository *repo;
void test_cherrypick_bare__initialize(void)
{
repo = cl_git_sandbox_init(TEST_REPO_PATH);
}
void test_cherrypick_bare__cleanup(void)
{
cl_git_sandbox_cleanup();
}
void test_cherrypick_bare__automerge(void)
{
git_commit *head = NULL, *commit = NULL;
git_index *index = NULL;
git_oid head_oid, cherry_oid;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "38c05a857e831a7e759d83778bfc85d003e21c45", 0, "file1.txt" },
{ 0100644, "a661b5dec1004e2c62654ded3762370c27cf266b", 0, "file2.txt" },
{ 0100644, "df6b290e0bd6a89b01d69f66687e8abf385283ca", 0, "file3.txt" },
};
git_oid_fromstr(&head_oid, "d3d77487660ee3c0194ee01dc5eaf478782b1c7e");
cl_git_pass(git_commit_lookup(&head, repo, &head_oid));
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_assert(merge_test_index(index, merge_index_entries, 3));
git_index_free(index);
git_commit_free(head);
git_commit_free(commit);
}
void test_cherrypick_bare__conflicts(void)
{
git_commit *head = NULL, *commit = NULL;
git_index *index = NULL;
git_oid head_oid, cherry_oid;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" },
{ 0100644, "a58ca3fee5eb68b11adc2703e5843f968c9dad1e", 1, "file2.txt" },
{ 0100644, "bd6ffc8c6c41f0f85ff9e3d61c9479516bac0024", 2, "file2.txt" },
{ 0100644, "563f6473a3858f99b80e5f93c660512ed38e1e6f", 3, "file2.txt" },
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 1, "file3.txt" },
{ 0100644, "1124c2c1ae07b26fded662d6c3f3631d9dc16f88", 2, "file3.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 3, "file3.txt" },
};
git_oid_fromstr(&head_oid, "bafbf6912c09505ac60575cd43d3f2aba3bd84d8");
cl_git_pass(git_commit_lookup(&head, repo, &head_oid));
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_assert(merge_test_index(index, merge_index_entries, 7));
git_index_free(index);
git_commit_free(head);
git_commit_free(commit);
}
void test_cherrypick_bare__orphan(void)
{
git_commit *head = NULL, *commit = NULL;
git_index *index = NULL;
git_oid head_oid, cherry_oid;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "38c05a857e831a7e759d83778bfc85d003e21c45", 0, "file1.txt" },
{ 0100644, "a661b5dec1004e2c62654ded3762370c27cf266b", 0, "file2.txt" },
{ 0100644, "85a4a1d791973644f24c72f5e89420d3064cc452", 0, "file3.txt" },
{ 0100644, "9ccb9bf50c011fd58dcbaa65df917bf79539717f", 0, "orphan.txt" },
};
git_oid_fromstr(&head_oid, "d3d77487660ee3c0194ee01dc5eaf478782b1c7e");
cl_git_pass(git_commit_lookup(&head, repo, &head_oid));
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_assert(merge_test_index(index, merge_index_entries, 4));
git_index_free(index);
git_commit_free(head);
git_commit_free(commit);
}

429
tests/cherrypick/workdir.c Normal file
View File

@@ -0,0 +1,429 @@
#include "clar.h"
#include "clar_libgit2.h"
#include "buffer.h"
#include "fileops.h"
#include "git2/cherrypick.h"
#include "../merge/merge_helpers.h"
#define TEST_REPO_PATH "cherrypick"
static git_repository *repo;
static git_index *repo_index;
// Fixture setup and teardown
void test_cherrypick_workdir__initialize(void)
{
repo = cl_git_sandbox_init(TEST_REPO_PATH);
git_repository_index(&repo_index, repo);
}
void test_cherrypick_workdir__cleanup(void)
{
git_index_free(repo_index);
cl_git_sandbox_cleanup();
}
/* git reset --hard d3d77487660ee3c0194ee01dc5eaf478782b1c7e
* git cherry-pick cfc4f0999a8367568e049af4f72e452d40828a15
* git cherry-pick 964ea3da044d9083181a88ba6701de9e35778bf4
* git cherry-pick a43a050c588d4e92f11a6b139680923e9728477d
*/
void test_cherrypick_workdir__automerge(void)
{
git_oid head_oid;
git_signature *signature = NULL;
size_t i;
const char *cherry_pick_oids[] = {
"cfc4f0999a8367568e049af4f72e452d40828a15",
"964ea3da044d9083181a88ba6701de9e35778bf4",
"a43a050c588d4e92f11a6b139680923e9728477d",
};
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "38c05a857e831a7e759d83778bfc85d003e21c45", 0, "file1.txt" },
{ 0100644, "a661b5dec1004e2c62654ded3762370c27cf266b", 0, "file2.txt" },
{ 0100644, "df6b290e0bd6a89b01d69f66687e8abf385283ca", 0, "file3.txt" },
{ 0100644, "38c05a857e831a7e759d83778bfc85d003e21c45", 0, "file1.txt" },
{ 0100644, "bd8fc3c59fb52d3c8b5907ace7defa5803f82419", 0, "file2.txt" },
{ 0100644, "df6b290e0bd6a89b01d69f66687e8abf385283ca", 0, "file3.txt" },
{ 0100644, "f06427bee380364bc7e0cb26a9245158e4726ce0", 0, "file1.txt" },
{ 0100644, "bd8fc3c59fb52d3c8b5907ace7defa5803f82419", 0, "file2.txt" },
{ 0100644, "df6b290e0bd6a89b01d69f66687e8abf385283ca", 0, "file3.txt" },
};
cl_git_pass(git_signature_new(&signature, "Picker", "picker@example.org", time(NULL), 0));
git_oid_fromstr(&head_oid, "d3d77487660ee3c0194ee01dc5eaf478782b1c7e");
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;
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]);
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(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_assert(merge_test_index(repo_index, merge_index_entries + i * 3, 3));
git_oid_cpy(&head_oid, &cherry_picked_oid);
git_tree_free(cherry_picked_tree);
git_commit_free(head);
git_commit_free(commit);
}
git_signature_free(signature);
}
/* git reset --hard bafbf6912c09505ac60575cd43d3f2aba3bd84d8
* git cherry-pick e9b63f3655b2ad80c0ff587389b5a9589a3a7110
*/
void test_cherrypick_workdir__conflicts(void)
{
git_commit *head = NULL, *commit = NULL;
git_oid head_oid, cherry_oid;
git_buf conflicting_buf = GIT_BUF_INIT, mergemsg_buf = GIT_BUF_INIT;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" },
{ 0100644, "a58ca3fee5eb68b11adc2703e5843f968c9dad1e", 1, "file2.txt" },
{ 0100644, "bd6ffc8c6c41f0f85ff9e3d61c9479516bac0024", 2, "file2.txt" },
{ 0100644, "563f6473a3858f99b80e5f93c660512ed38e1e6f", 3, "file2.txt" },
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 1, "file3.txt" },
{ 0100644, "1124c2c1ae07b26fded662d6c3f3631d9dc16f88", 2, "file3.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 3, "file3.txt" },
};
git_oid_fromstr(&head_oid, "bafbf6912c09505ac60575cd43d3f2aba3bd84d8");
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, "e9b63f3655b2ad80c0ff587389b5a9589a3a7110");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(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_assert(merge_test_index(repo_index, merge_index_entries, 7));
cl_git_pass(git_futils_readbuffer(&mergemsg_buf,
TEST_REPO_PATH "/.git/MERGE_MSG"));
cl_assert(strcmp(git_buf_cstr(&mergemsg_buf),
"Change all files\n" \
"\n" \
"Conflicts:\n" \
"\tfile2.txt\n" \
"\tfile3.txt\n") == 0);
cl_git_pass(git_futils_readbuffer(&conflicting_buf,
TEST_REPO_PATH "/file2.txt"));
cl_assert(strcmp(git_buf_cstr(&conflicting_buf),
"!File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"File 2!!\n" \
"File 2\n" \
"File 2\n" \
"File 2\n" \
"<<<<<<< HEAD\n" \
"File 2\n" \
"=======\n" \
"File 2!\n" \
"File 2\n" \
"File 2!\n" \
">>>>>>> e9b63f3... Change all files\n") == 0);
cl_git_pass(git_futils_readbuffer(&conflicting_buf,
TEST_REPO_PATH "/file3.txt"));
cl_assert(strcmp(git_buf_cstr(&conflicting_buf),
"!File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"File 3!!\n" \
"File 3\n" \
"File 3\n" \
"File 3\n" \
"<<<<<<< HEAD\n" \
"=======\n" \
"File 3!\n" \
"File 3!\n" \
">>>>>>> e9b63f3... Change all files\n") == 0);
git_commit_free(commit);
git_commit_free(head);
git_buf_free(&mergemsg_buf);
git_buf_free(&conflicting_buf);
}
/* git reset --hard bafbf6912c09505ac60575cd43d3f2aba3bd84d8
* git cherry-pick -X ours e9b63f3655b2ad80c0ff587389b5a9589a3a7110
*/
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;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" },
{ 0100644, "a58ca3fee5eb68b11adc2703e5843f968c9dad1e", 1, "file2.txt" },
{ 0100644, "bd6ffc8c6c41f0f85ff9e3d61c9479516bac0024", 2, "file2.txt" },
{ 0100644, "563f6473a3858f99b80e5f93c660512ed38e1e6f", 3, "file2.txt" },
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 1, "file3.txt" },
{ 0100644, "1124c2c1ae07b26fded662d6c3f3631d9dc16f88", 2, "file3.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 3, "file3.txt" },
};
struct merge_index_entry merge_filesystem_entries[] = {
{ 0100644, "242e7977ba73637822ffb265b46004b9b0e5153b", 0, "file1.txt" },
{ 0100644, "bd6ffc8c6c41f0f85ff9e3d61c9479516bac0024", 0, "file2.txt" },
{ 0100644, "1124c2c1ae07b26fded662d6c3f3631d9dc16f88", 0, "file3.txt" },
};
/* leave the index in a conflicted state, but checkout "ours" to the workdir */
opts.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE | GIT_CHECKOUT_USE_OURS;
git_oid_fromstr(&head_oid, "bafbf6912c09505ac60575cd43d3f2aba3bd84d8");
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, "e9b63f3655b2ad80c0ff587389b5a9589a3a7110");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(repo, commit, &opts));
cl_assert(merge_test_index(repo_index, merge_index_entries, 7));
cl_assert(merge_test_workdir(repo, merge_filesystem_entries, 3));
/* resolve conflicts in the index by taking "ours" */
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_assert(merge_test_index(repo_index, merge_filesystem_entries, 3));
cl_assert(merge_test_workdir(repo, merge_filesystem_entries, 3));
git_commit_free(commit);
git_commit_free(head);
}
/* git reset --hard cfc4f0999a8367568e049af4f72e452d40828a15
* git cherry-pick 2a26c7e88b285613b302ba76712bc998863f3cbc
*/
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;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "19c5c7207054604b69c84d08a7571ef9672bb5c2", 0, "file1.txt" },
{ 0100644, "a58ca3fee5eb68b11adc2703e5843f968c9dad1e", 0, "file2.txt" },
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 0, "file3.txt.renamed" },
};
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
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, "2a26c7e88b285613b302ba76712bc998863f3cbc");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(repo, commit, &opts));
cl_assert(merge_test_index(repo_index, merge_index_entries, 3));
git_commit_free(commit);
git_commit_free(head);
}
/* git reset --hard 44cd2ed2052c9c68f9a439d208e9614dc2a55c70
* git cherry-pick 2a26c7e88b285613b302ba76712bc998863f3cbc
*/
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;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "19c5c7207054604b69c84d08a7571ef9672bb5c2", 0, "file1.txt" },
{ 0100644, "a58ca3fee5eb68b11adc2703e5843f968c9dad1e", 0, "file2.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 1, "file3.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 3, "file3.txt.renamed" },
{ 0100644, "28d9eb4208074ad1cc84e71ccc908b34573f05d2", 2, "file3.txt.renamed_on_branch" },
};
opts.merge_opts.flags |= GIT_MERGE_TREE_FIND_RENAMES;
opts.merge_opts.rename_threshold = 50;
git_oid_fromstr(&head_oid, "44cd2ed2052c9c68f9a439d208e9614dc2a55c70");
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, "2a26c7e88b285613b302ba76712bc998863f3cbc");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(repo, commit, &opts));
cl_assert(merge_test_index(repo_index, merge_index_entries, 5));
cl_git_pass(git_futils_readbuffer(&mergemsg_buf,
TEST_REPO_PATH "/.git/MERGE_MSG"));
cl_assert(strcmp(git_buf_cstr(&mergemsg_buf),
"Renamed file3.txt -> file3.txt.renamed\n" \
"\n" \
"Conflicts:\n" \
"\tfile3.txt\n" \
"\tfile3.txt.renamed\n" \
"\tfile3.txt.renamed_on_branch\n") == 0);
git_buf_free(&mergemsg_buf);
git_commit_free(commit);
git_commit_free(head);
}
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;
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_assert(!git_path_exists(TEST_REPO_PATH "/.git/CHERRY_PICK_HEAD"));
cl_assert(!git_path_exists(TEST_REPO_PATH "/.git/MERGE_MSG"));
git_reference_free(head);
git_commit_free(commit);
}
/* git reset --hard cfc4f0999a8367568e049af4f72e452d40828a15
* git cherry-pick abe4603bc7cd5b8167a267e0e2418fd2348f8cff
*/
void test_cherrypick_workdir__merge_fails_without_mainline_specified(void)
{
git_commit *head, *commit;
git_oid head_oid, cherry_oid;
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
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, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_must_fail(git_cherry_pick(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"));
git_commit_free(commit);
git_commit_free(head);
}
/* git reset --hard cfc4f0999a8367568e049af4f72e452d40828a15
* git cherry-pick -m1 abe4603bc7cd5b8167a267e0e2418fd2348f8cff
*/
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;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "f90f9dcbdac2cce5cc166346160e19cb693ef4e8", 0, "file1.txt" },
{ 0100644, "563f6473a3858f99b80e5f93c660512ed38e1e6f", 0, "file2.txt" },
{ 0100644, "e233b9ed408a95e9d4b65fec7fc34943a556deb2", 0, "file3.txt" },
};
opts.mainline = 1;
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
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, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(repo, commit, &opts));
cl_assert(merge_test_index(repo_index, merge_index_entries, 3));
git_commit_free(commit);
git_commit_free(head);
}
/* git reset --hard cfc4f0999a8367568e049af4f72e452d40828a15
* git cherry-pick -m2 abe4603bc7cd5b8167a267e0e2418fd2348f8cff
*/
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;
struct merge_index_entry merge_index_entries[] = {
{ 0100644, "487434cace79238a7091e2220611d4f20a765690", 0, "file1.txt" },
{ 0100644, "e5183bfd18e3a0a691fadde2f0d5610b73282d31", 0, "file2.txt" },
{ 0100644, "409a1bec58bf35348e8b62b72bb9c1f45cf5a587", 0, "file3.txt" },
};
opts.mainline = 2;
git_oid_fromstr(&head_oid, "cfc4f0999a8367568e049af4f72e452d40828a15");
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, "abe4603bc7cd5b8167a267e0e2418fd2348f8cff");
cl_git_pass(git_commit_lookup(&commit, repo, &cherry_oid));
cl_git_pass(git_cherry_pick(repo, commit, &opts));
cl_assert(merge_test_index(repo_index, merge_index_entries, 3));
git_commit_free(commit);
git_commit_free(head);
}

View File

@@ -0,0 +1 @@
ref: refs/heads/automerge-branch

View File

@@ -0,0 +1,7 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true

Binary file not shown.

View File

@@ -0,0 +1,6 @@
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

View File

@@ -0,0 +1,3 @@
xĄÎA
Â0@Q×9Ĺ왤“i—Ţ`L§µB¬MÓ…··ŕÜľĹç§)籂#ŢŐ˘
^ťCNťŘä™”Îb+<1C>%¸<>¬ŹŠ÷¨bŢRôU!ő‰zŚ1Jh¸ő)JO}딼ë<08> µ>¦WIóŞ \´äqy¬źŽĎź çĄŇ”O`ČDÍ6{t<>fÓmµę_sÓy@Ö2¨ů("O-

View File

@@ -0,0 +1 @@
x¥<>MjΓ0…»Φ)f_jτο<>]΅Λά`$<24>—*Nδ1΄·―C=@—ο{πρ^YZlLO<4C>Α<E2809D>³―Uz‡ub“<62>·£/±βX1™μ"iu£ΞWN9ΊκbΩ<>„ΊθZ<03>S&r4£mrY:ΌQΉoΌΒ+χ6―—ν{…ΓΗ/{?­<>gΚ<><CE9A>`\<5C>ήk-<k«µΪι>Uψ_uζ+5<> Ξ<C2A0>μωx9ώ…a?υ¨Υ7<>W…

View File

@@ -0,0 +1 @@
x<>ÁJÅ0E]ç+f÷¢¤“IšwàGLÒÉk…´š¦ ÿÞÊóÜž‡{óVëÒG{׈A9¹ ˆÊÄšcô:ÊPÜ”ˆCJBž¬ù”¦k‡\2ËÌ]}ˆj‰¥PQÉãD6b”Á9ú¼5x“üuè¯Úê²ÏÇ÷O7v}Ù{[¤ËcÞê3 ŽžàÞ¢µæ¤çÔ®ÿ<C2AE>#þEÌ»¶ëy³Éšg¸TÙÏàµoPÕÃM™Í/X˜

View File

@@ -0,0 +1,5 @@
x<01><>MjÃ0…»Ö)fj¤ñH „ìÃdÔ¸Dq#ËÐÞ¾
-tßåûáã=YJ™`HO­ªt.DòS´ä½JN.ø1ŠÁIÉ#góÁUo $ eRâ8†É‡¨j/žÉFŒì¼á­]
¯,÷MW8j-ózÙ¾VxyÿñÞk«37d){pc
Ôˆ°³h­énŸÚô
îbNzã¢gÈóUÇ¡}6xÞÿ‰¡ŸzÄæï*V8

View File

@@ -0,0 +1 @@
xĄŹÁNÄ0C9ç+推’É$M$´â†Ä‘XÍ&Úi!M%ř{şđ ÜěgɲÓZëÜÇp× .É0Ą<30>c$Ť¦<C5A4>ÍÖňetBčPpLě˝Éę<C389>,RITtŚ<C59A>őŁóA4E.TFr<>I lśâ˝Ok<4F>Nź»lđ,­ÎŰ´ođxýcoO[o3wŇZO`lôD.÷µV=¦vůW‰z•…«d(ó»Řˇux8ýšŽO·ôĽ.çKă%MęÖ?ZŘ

View File

@@ -0,0 +1,4 @@
x<01><>MjÃ0…»Ö)fj¤ñH „ìÃdÔ¸Dq#ËÐÞ¾
-tßåûáã=YJ™`HO­ªt.DòS´ä½JN.ø1ŠÁIÉ#góÁUo $ eRâ8†É‡¨j/žÉFŒì¼á­]
¯,÷MW8j-ózÙ¾VxyÿñÞk«37d){pc
Ôˆ°³h­énŸÚô?J¿=Cž¯:í³ÁóþO ýÔ#6ßïäV<

View File

@@ -0,0 +1 @@
x+)JMU044d040031QHËÌI5Ô+©(aøô¦§çãÊßU ÜE9sì \uIXœÌvKYÕ;7níêøøMý3Kd“F"c°¢ˆ•áï®x?3¦5öׯ·zÓÄѨ1*

View File

@@ -0,0 +1 @@
x¥־=jֳ@@בװ{<7B>י fvצLpgp“3ּ<33>F²<>ױ×נםmנׂ¾גדֹ÷,sע«7Uאל$<24> ©₪<C2A9>1 :HנEcָ.d*1<>Q«p5nzןאT²h}A"I.•<>SֵAֵ:Hys ן}Z\Yv<E2808F>א¢m™·inpת´<E2808E>yכmז־GY—o°®ִ`ֹ$Dף®ןױ®<D7B1>BּO{L|‡f^הנOA

View File

@@ -0,0 +1 @@
x¥ÎMjÃ0†á®uŠÙÂHŠþ ”B<17>Üb4Ç.ÝJ2´·<C2B4> Gèöáãåã½”µƒqñ¥WÈ9<>¼ãl=#»`5GÎsDD5ê(êªlìXš!—„Æp°!e$2NÂÚ2{ç9†IÑÑ—½Â<C2BD>øû<C3B8>W©emËñÛàõóÏîï­×•:<3A>y/o 7pBƒ¨†Ž«]þQ mw™`^¢Ïý§Ã¾A¡6ºê mT

View File

@@ -0,0 +1 @@
x¥Î1ŠÃ0­uŠéA<1E>¤,!] åÞ`,<2C>/h<>ÈrÛǰGHûŠÏÏK­s¤ðÕ›*heæ”Éæ§8ªÅè<19>ýèJ*(<>¦rÉTlJIØ…è«¥$…JD%<25>YFÁÙú}ip•üÜt…¶:¯÷íµÂ÷ï¿ÝÎko³t9楞`p)­5»î«]?Š˜}nsS¨ÚnjÞGPOL

View File

@@ -0,0 +1,4 @@
x¥<>KNÄ0DYç½›Ùî´?<42><C3AC>8D»ÓžÉHNÀqÜžŒFœ€í«ª'•¬µÎÐÆ‡ÞT!‰`*Â<±+,YÑZ
%LÞˆóÆÙ„ýðÅM—ì“X$çÄNÈ$S.cq89
š‰ìDÞš¿¾¦ìo{¢ìxŠFL)Æ”‰ÅÄÈÁ}ÞûemðÁò½ëïÚê¼]öŸ ^®wv~Ûz¹ó³¬õ,&?Ži„GãŒz\ëú/Éð©í¬<C3AD>/r<>Såíž`^ú
õ=Ý£áX¾fZ

View File

@@ -0,0 +1,2 @@
x¥ÍA
B!€áÖžböAŒ6ŠBD» [¨o^Ï@$ݾ¡í·øÿÜj-Úƒtf ä<C2A0>]²#““ã":dKiõ Æû51S@RqÊÖ:<b~Opç^ËØægÀåõ³çmH/Qâ)·z}ÎjCˆpDƒ¨vÝ×ÂK»<È

View File

@@ -0,0 +1 @@
x¥ÎÍJÅ0@a×yŠì…Ëä?] ¾Åd2i+7<>¦)èÛ[ðÜ~áÞÚ6¥öîafY<66><59>ÏÕH1„ì¼K%¢+E<17>!…(>qð>¥q”µehMÁ„”}ÈP˜”!ò:ÖCxεùŽôuò!ßx´íXÏŸC>}üÙòṟáÄõö,•IÞç<E2809A> Ä¥×êäEÄë9{ã±0æ;KZq_®<5F>¾ËºÝYÝæ÷¿t3V<33>

View File

@@ -0,0 +1 @@
xĄŽAjĂ0E»Ö)f_¶¤‘,ˇ]z<˛]"«•ÇĐŢľ‚!Ë˙ř<^ŞĄlÚá4fŔě=iM0HÉir: š<kiFGž§hI}Să] ő™ă4FÇ ŤťqfĘšl˙ÄŕÁŹŻč”µ6ř¤ôsňÜĘv¬çßׯi ]R-7č ÎÄ áuĐĂ :í©ÂOIÔű)µp[<5B>âť!­´/=§î<C2A7>·;ë‹üŠú&éWY

View File

@@ -0,0 +1 @@
x¥ÎKJ1€a×9Eí…!ïI@df%xª¤ú!“ަ«AooƒGpû-~þÒ[[l O2˜AWï¯ 6ŽÑÄRÙÕ=yFW ¥ƒúÄÁ›@Õ“5l®Ä(×™šœÏÚçdúÉr­²ôïX¾Þá<C39E>G[÷åøÙáåãÏæÛ.cEÁKéíŒËÑ»²…gmµV§ž«ÂÿЍû!½ñ˜éÁPÜæs§o0­vùõ *Wd

View File

@@ -0,0 +1,2 @@
x¥ÎMjÃ0@á®uŠÙŠ<Ë!<21>E¡·É£ØÅ?‰$/rûz„n¿Åã¥}]çHÃG+ªzåè¼"*k
¡×AºìÆHìc”èÓhÍ]Šn RN”-3Kp~è}PK,™ò€J=Ždéz#Gö?‡VøÖ²Îu:žN¿v»ÔVfiò•öõ <0C>cOÎ;ðiÑZóÖ÷jÓEÌuí¦ Ëy^´š-˜P@

View File

@@ -0,0 +1 @@
d3d77487660ee3c0194ee01dc5eaf478782b1c7e

View File

@@ -0,0 +1 @@
2a26c7e88b285613b302ba76712bc998863f3cbc

View File

@@ -0,0 +1 @@
abe4603bc7cd5b8167a267e0e2418fd2348f8cff

View File

@@ -0,0 +1 @@
bafbf6912c09505ac60575cd43d3f2aba3bd84d8

View File

@@ -0,0 +1 @@
cfc4f0999a8367568e049af4f72e452d40828a15

View File

@@ -0,0 +1 @@
74f06b5bfec6d33d7264f73606b57a7c0b963819

View File

@@ -0,0 +1 @@
44cd2ed2052c9c68f9a439d208e9614dc2a55c70

View File

@@ -0,0 +1,15 @@
!File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1
File 1

View File

@@ -0,0 +1,15 @@
!File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2
File 2

View File

@@ -0,0 +1,15 @@
!File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3
File 3