- // is it a roojs origin?
- var r = this.git({ "remote" , "get-url" , "--push" , "origin"});
- var uri = new Soup.URI(r);
- if (uri.get_host() != "git.roojs.com") { // we can only push to this url. -- unless we have forced it to be managed.
- return FileUtils.test(this.gitdir + "/.gitlive-managed" , FileTest.EXISTS);
+ // managed =
+ if (this.get_config("managed") == "") {
+ this.set_config("managed", this.host == "git.roojs.com" ? "1" : "0");
+ }
+ if (this.get_config("autocommit") == "") {
+ this.set_config("autocommit", this.host == "git.roojs.com" ? "1" : "0");
+ }
+ if (this.get_config("autopush") == "") {
+ this.set_config("autopush", this.host == "git.roojs.com" ? "1" : "0");
+ }
+ }
+
+
+
+ public string get_config(string key) {
+ try {
+ return this.git({ "config" , "gitlive." + key });
+ } catch (Error e) {
+ return ""; // happens when there is nothing set...