this.git( cmd );
cmd = { "commit", "--m", commit_message };
this.git( cmd );
+ this.push();
this.loadBranches(); // updates lastrev..
var notification = new Notify.Notification(
public bool createBranchNamed(string branchname)
{
-
+ var stash = false;
if (this.branches.has_key(branchname)) {
// this is where it get's tricky...
try {
string[] cmd = { "ls-files" , "-m" }; // list the modified files..
var ret = this.git(cmd);
- var stash = ret.length> 1 ;
+ stash = ret.length> 1 ;
cmd = { "stash" };
}
try {
- cmd = { "merge", "master" };
+ string[] cmd = { "merge", "master" };
this.git(cmd);
} catch(Error e) {
try {
- cmd = { "mergetool" };
+ string[] cmd = { "mergetool" };
this.git(cmd);
- cmd = { "commit" "-m" "Fix merge conflicts from master" };
+ cmd = { "commit", "-m" , "Fix merge conflicts from master" };
this.git(cmd);
} catch(Error ee) {
GitMonitor.gitmonitor.pauseError(ee.message);
}
}
try {
- cmd = { "stash", "pop" };
+ string[] cmd = { "stash", "pop" };
if (stash) { this.git(cmd); }
} catch(Error ee) {
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;
notification.show();
- } catch(Error e) {
- GitMonitor.gitmonitor.pauseError(e.message);
- return false;
- }
this.loadBranches(); // update branch list...
GitMonitor.gitmonitor.runQueue(); // commit any outstanding...
return true;
public string push () throws Error, SpawnError
{
// should
- return this.git({ "push", "origin", "HEAD" });
+ return this.git({ "push", "--all" });
}