handling of old branches
authorAlan Knowles <alan@roojs.com>
Mon, 5 Nov 2018 07:33:39 +0000 (15:33 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 5 Nov 2018 07:33:39 +0000 (15:33 +0800)
GitRepo.vala

index 6108c1e..77a56f2 100644 (file)
@@ -266,6 +266,7 @@ public class GitRepo : Object
                this.git( cmd );
                 cmd = { "commit",   "--m",  commit_message };
                this.git( cmd );
+               this.push();
                this.loadBranches(); // updates lastrev..
                
                var notification = new Notify.Notification(
@@ -389,13 +390,15 @@ public class GitRepo : Object
                                                GitMonitor.gitmonitor.pauseError(ee.message);
                                                return false;           
                                        }
-                                   
+                   this.push();
                    
                    } else {
                                    try {                                       
                                           
                                        string[] cmd = { "checkout", "-b" , branchname  };
                                        this.git(cmd);
+                                       
+                       this.push();                                    
                                        } catch(Error ee) {
                                                GitMonitor.gitmonitor.pauseError(ee.message);
                                                return false;           
@@ -579,7 +582,7 @@ public class GitRepo : Object
     public string push () throws Error, SpawnError
     {
         // should 
-        return this.git({ "push", "origin", "HEAD" });
+        return this.git({ "push", "--all" });
         
     }