GitRepo.vala
[gitlive] / GitRepo.vala
index 64f1bcf..f4a12d1 100644 (file)
@@ -171,6 +171,12 @@ public class GitRepo : Object
                if ( !cache.has_key(path) ) {
                        cache.set( path, this);
        }
+       
+       var r = this.git({ "remote" , "get-url" , "--push" , "origin"});
+       var uri = new Soup.URI(r);      
+       this.host = uri.get_host();
+
+       
        this.loadBranches();
        this.loadActiveTicket();
        this.loadStatus();
@@ -198,7 +204,7 @@ public class GitRepo : Object
     
     
     public bool is_autocommit ()
-    {
+    {          
        return !FileUtils.test(this.gitdir + "/.gitlive-disable-autocommit" , FileTest.EXISTS);
     }
     public void set_autocommit(bool val)
@@ -220,7 +226,16 @@ public class GitRepo : Object
     
     public bool is_auto_branch ()
     {
-       return FileUtils.test(this.gitdir + "/.gitlive-enable-auto-branch" , FileTest.EXISTS);
+       if (this.name == "gitlog") {
+               return false;
+               }
+               // check remote...
+       if (this.is_managed()) {
+               return true;
+               }
+       return false;
+       
     }
     
     public void set_auto_branch(bool val)