Changed GitBranch.vala
authorAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2019 08:52:31 +0000 (16:52 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2019 08:52:31 +0000 (16:52 +0800)
GitBranch.vala

index a30808b..dc7f937 100644 (file)
@@ -111,8 +111,16 @@ public class GitBranch : Object
                 
             branches.get(rname).name = lname;
         }
-        foreach(var br in local.values) {
-               GLib.debug("BRANCH:\n%s\n" , br.toString());
+        foreach(var br in branches.values) {
+               if (br.name.length > 0 || ! /^remotes\/origin\//.match(br.remote)) {
+                       continue;
+               }
+               var newname = br.remote.replace("/remotes/origin/","");
+               if (branches.has_key(newname)) {
+                       continue;
+                       }
+               repo.get( { "branch" "--track", newname, "origin/" + newname} ); 
+               //GLib.debug("BRANCH:\n%s\n" , br.toString());
         }
         
         /*