projects
/
gitlive
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sync
[gitlive]
/
GitRepo.vala
diff --git
a/GitRepo.vala
b/GitRepo.vala
index
9e19695
..
7ec4f41
100644
(file)
--- a/
GitRepo.vala
+++ b/
GitRepo.vala
@@
-179,6
+179,11
@@
public class GitRepo : Object
{
return !FileUtils.test(this.gitdir + "/.gitlive-disable-autocommit" , FileTest.EXISTS);
}
{
return !FileUtils.test(this.gitdir + "/.gitlive-disable-autocommit" , FileTest.EXISTS);
}
+
+ public bool is_auto_branch ()
+ {
+ return FileUtils.test(this.gitdir + "/.gitlive-enable-auto-branch" , FileTest.EXISTS);
+ }
public bool is_autopush ()
{
return !FileUtils.test(this.gitdir + "/.gitlive-disable-autopush" , FileTest.EXISTS);
public bool is_autopush ()
{
return !FileUtils.test(this.gitdir + "/.gitlive-disable-autopush" , FileTest.EXISTS);
@@
-247,9
+252,7
@@
public class GitRepo : Object
}
GitMonitor.gitmonitor.start();
}
}
GitMonitor.gitmonitor.start();
}
-
-
-
+
public bool doMerge(string action, string ticket_id, string commit_message)
{
public bool doMerge(string action, string ticket_id, string commit_message)
{
@@
-258,13
+261,12
@@
public class GitRepo : Object
var ret = "";
if (action == "CLOSE" || action == "LEAVE") {
var ret = "";
if (action == "CLOSE" || action == "LEAVE") {
-
try {
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 );
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..
this.git( cmd );
this.push();
this.loadBranches(); // updates lastrev..
@@
-367,11
+369,16
@@
public class GitRepo : Object
} catch(Error e) {
GitMonitor.gitmonitor.pauseError(e.message);
return false;
} catch(Error e) {
GitMonitor.gitmonitor.pauseError(e.message);
return false;
-
}
try {
}
try {
- string[] cmd = { "merge", "master" };
- this.git(cmd);
+ if (branchname != "master") {
+ string[] cmd = { "merge", "master" };
+ this.git(cmd);
+ this.push();
+ //cmd = { "commit", "-a" , "-m", "merge master changes" };
+ //git chethis.git( cmd );
+ }
+
} catch(Error e) {
string[] cmd = { "checkout", "master" };
this.git(cmd);
} catch(Error e) {
string[] cmd = { "checkout", "master" };
this.git(cmd);