GitRepo.vala
[gitlive] / GitRepo.vala
index 7985e81..5fbdb0d 100644 (file)
@@ -19,6 +19,7 @@ public class GitRepo : Object
     public string git_working_dir;
     public bool debug = false;
     public bool has_local_changes = false;
+    public string host = "";
     public string git_status;    
     public string git_diff;        
     public string ahead_or_behind = "";
@@ -171,6 +172,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();
@@ -224,8 +231,12 @@ public class GitRepo : Object
                return false;
                }
                // check remote...
+       if (this.is_managed()) {
+               return true;
+               }
+       return false;
        
-       return FileUtils.test(this.gitdir + "/.gitlive-enable-auto-branch" , FileTest.EXISTS);
     }
     
     public void set_auto_branch(bool val)