projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14a44f1
)
Git.vala
author
Alan Knowles
<alan@roojs.com>
Fri, 15 Mar 2019 05:50:06 +0000
(13:50 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 15 Mar 2019 05:50:06 +0000
(13:50 +0800)
Git.vala
patch
|
blob
|
history
diff --git
a/Git.vala
b/Git.vala
index
0755899
..
566ad55
100644
(file)
--- a/
Git.vala
+++ b/
Git.vala
@@
-211,10
+211,15
@@
namespace GitLive {
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);
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);
- ix.write();
+
+ // might be conflicts..
+ if (ix.has_conflicts()) {
+ GLib.debug("merge has conflicts");
+ return;
+ }
+ this.repo.checkout_index(ix, new Ggit.CheckoutOptions());
var treeoid = ix.write_tree();
var treeoid = ix.write_tree();
-
var parents = new Ggit.Commit[] { master_commit };
var parents = new Ggit.Commit[] { master_commit };