X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=GitRepo.vala;h=034d535cf852d482fff3024648d854f165b3dedb;hb=1245856c12bd5161158d057fc603ae5f4b0dfcee;hp=0cc1e50a9aedced6f4c1dc8fc2b57107ca31da6a;hpb=b665a276cf4fb2fcc5fd70fdfb8194067323589e;p=gitlive diff --git a/GitRepo.vala b/GitRepo.vala index 0cc1e50a..034d535c 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -247,9 +247,7 @@ public class GitRepo : Object } GitMonitor.gitmonitor.start(); } - - - + public bool doMerge(string action, string ticket_id, string commit_message) { @@ -258,10 +256,9 @@ public class GitRepo : Object var ret = ""; if (action == "CLOSE" || action == "LEAVE") { - try { - var oldbranch = this.currentBranch.name; - this.setActiveTicket(null, "master"); + var oldbranch = this.currentBranch.name; + this.setActiveTicket(null, "master"); string [] cmd = { "merge", "--squash", oldbranch }; this.git( cmd ); cmd = { "commit", "-a" , "-m", commit_message }; @@ -370,8 +367,12 @@ public class GitRepo : Object } try { - string[] cmd = { "merge", "master" }; - this.git(cmd); + if (branchname != "master") { + string[] cmd = { "merge", "master" }; + this.git(cmd); + cmd = { "commit", "-a" , "-m", commit_message }; + this.git( cmd ); + } } catch(Error e) { string[] cmd = { "checkout", "master" }; this.git(cmd);