GitBranch.vala
authorAlan Knowles <alan@roojs.com>
Wed, 20 Mar 2019 07:07:23 +0000 (15:07 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 Mar 2019 07:07:23 +0000 (15:07 +0800)
GitBranch.vala

index 9efe374..8a12f2c 100644 (file)
@@ -69,7 +69,17 @@ public class GitBranch : Object
                //var local =  new Gee.HashMap<string,GitBranch>();
                //var remotes  =  new Gee.HashMap<string,GitBranch>();
                 
-
+  
+               
+               if (!force && this.remote_heads != null) {
+                       return;
+               }
+               var r = repo.repo.lookup_remote("origin");
+               var cb = new GitCallbacks(repo);
+               r.connect(Ggit.Direction.FETCH, cb, null, null);
+               this.remote_heads = r.list();
+       
+        
                repo.loadRemoteHeads();