sync with changes
[gitlive] / GitRepo.vala
index 9e19695..dafecc6 100644 (file)
@@ -258,13 +258,12 @@ 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",   "--m",  commit_message };
+                cmd = { "commit",   "-a" , "-m",  commit_message };
                this.git( cmd );
                this.push();
                this.loadBranches(); // updates lastrev..
@@ -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);