var commits = new Ggit.AnnotatedCommit[] { ac };
this.repo.merge(commits, mo, co);
- /*
- if (ix.has_conflicts()) {
- GLib.debug("merge has conflicts");
- return;
- }
-
- var cfg = this.repo.get_config().snapshot();
- var sig = new Ggit.Signature.now(
- cfg.get_string("user.name"),
- cfg.get_string("user.email")
+ var sig = new Ggit.Signature.now(
+ this.repo.get_config().get_string("user.name"),
+ this.repo.get_config().get_string("user.email")
);
-
- var parents = new Ggit.OId[] { anc_commit.get_id() };
-
- var treeoid = ix.write_tree_to(this.repo);
-
- this.repo.create_commit_from_ids("HEAD",
- sig, sig, null, "Test Merge", treeoid, parents);
+ var new_head = this.repo.get_head();
- /*
- var master_tree = master_commit.get_tree();
- var head_tree = head_commit.get_tree();
- var mo = new Ggit.MergeOptions();
- mo.set_file_favor(Ggit.MergeFileFavor.THEIRS);
- var ix = this.repo.merge_trees(anc_tree, master_tree, head_tree, mo);
-
- // might be conflicts..
- this.repo.checkout_index(ix, new Ggit.CheckoutOptions());
- var treeoid = ix.write_tree();
-
-
- var parents = new Ggit.Commit[] { master_commit };
-
-
- var new_tree = this.repo.lookup(treeoid,typeof (Ggit.Tree)) as Ggit.Tree;
-
- );
this.repo.create_commit("HEAD", sig, sig, null, "Test Merge", new_tree, parents);
- */
+
}