GLib.debug("%d: %s, %s", line.get_new_lineno(), line.get_origin().to_string(), line.get_text());
return 0;
});
+ // let's try a merge..
+ var mo = new Ggit.MergeOptions();
+ mo.set_file_favor(Ggit.MergeFileFavor.THEIRS);
+ var ix = this.repo.merge_trees(null, master_tree, head_tree, mo);
+
+ if (ix.has_conflicts()) {
+ GLib.debug("merge has conflicts");
+ return;
+ }
+ 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;
+
+ var sig = new Ggit.Signature.now(
+ Ggit.Config.get_string("user.name"),
+ Ggit.Config.get_string("user.email")
+ );
+ a.repo.create_commit("HEAD", sig, sig, null, "test commit " + str, new_tree, parents);
+
-// noid = a.next()
- // while (noid != null) {
-
-
- // noid = a.next();
- // }