GitRepo.vala
authorAlan Knowles <alan@roojs.com>
Wed, 19 Dec 2018 03:53:56 +0000 (11:53 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 19 Dec 2018 03:53:56 +0000 (11:53 +0800)
GitRepo.vala

index 4ce43e5..c037454 100644 (file)
@@ -247,6 +247,20 @@ public class GitRepo : Object
                if (cur == val) {
                        return; // no change..
                }
                if (cur == val) {
                        return; // no change..
                }
+       if (this.host != "git.roojs.com") { // we can only push to this url. -- unless we have forced it to be managed.
+               // remote is not our server..
+               if (val) {
+                       FileUtils.set_contents(this.gitdir + "/.gitlive-managed" , "x");
+               } else {
+                       FileUtils.remove(this.gitdir + "/.gitlive-managed" ); 
+                       }
+               return;
+
+       }
+       // otherwise see if unmanaged is set to disable it..
+       return !FileUtils.test(this.gitdir + "/.gitlive-unmanaged" , FileTest.EXISTS);  
+               
+               
                if (val) {
                        FileUtils.set_contents(this.gitdir + "/.gitlive-enable-auto-branch" , "x");
                } else {
                if (val) {
                        FileUtils.set_contents(this.gitdir + "/.gitlive-enable-auto-branch" , "x");
                } else {