GitBranch.vala
authorAlan Knowles <alan@roojs.com>
Wed, 20 Mar 2019 06:43:54 +0000 (14:43 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 Mar 2019 06:43:54 +0000 (14:43 +0800)
GitBranch.vala

index 5b001f8..3561793 100644 (file)
@@ -70,8 +70,23 @@ public class GitBranch : Object
                
                
 
-               this.repo.repo.loadRemoteHeads();
+               repo.repo.loadRemoteHeads();
+               
+               
+               var r = repo.repo.enumerate_branches(Ggit.BranchType.LOCAL);
+               while (r.next()) {
+                       var br = r.get() as Ggit.Branch;
+                        
+                       this.branches.add(br);
+                       if (br.is_head()) {
+                               GLib.debug("HEAD= %s", br.get_name());
+                               this.head = br;
+                       }
                        
+               }
+               
+               
                
       //        repo.git( { "fetch",  "-a" } ); == done async before...