From beb0b87544a81660c3e886c1130306bb54efb2cd Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 5 Nov 2018 15:33:39 +0800 Subject: [PATCH] handling of old branches --- GitRepo.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/GitRepo.vala b/GitRepo.vala index 6108c1ee..77a56f2f 100644 --- a/GitRepo.vala +++ b/GitRepo.vala @@ -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" }); } -- 2.39.2