X-Git-Url: http://git.roojs.org/?p=gitlive;a=blobdiff_plain;f=GitRepo.vala;h=dafecc6e6614ca61a1f4acfab6d70d661bb6f704;hp=0cc1e50a9aedced6f4c1dc8fc2b57107ca31da6a;hb=a7c56bd8db80c18c34c08e2b6cc7cf4c8eca33d5;hpb=b665a276cf4fb2fcc5fd70fdfb8194067323589e diff --git a/GitRepo.vala b/GitRepo.vala index 0cc1e50a..dafecc6e 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -258,10 +258,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 +369,10 @@ public class GitRepo : Object } try { - string[] cmd = { "merge", "master" }; - this.git(cmd); + if (branchname != "master") { + string[] cmd = { "merge", "master" }; + this.git(cmd); + } } catch(Error e) { string[] cmd = { "checkout", "master" }; this.git(cmd);