+ // behind or infront..
+ }
+ if (br.active) {
+ GLib.debug("repo: %s currentBranch = %s", repo.name, br.name);
+ repo._currentBranch = br;
+ }
+
+ }
+
+ // find unused remotes.. and track them...
+ foreach(var rn in remotes_used.keys) {
+ if (remotes_used.get(rn)) {
+ continue;
+ }
+ if (repo.branches.has_key(rn)) {
+ GLib.debug("skip tracking branch - same name exists?");
+ continue;
+ }
+ // not clear how to do this yet...
+ try {
+ repo.git( { "branch" ,"--track" , rn, "origin/" + rn} );
+ } catch (Error e) {
+ continue; // allow failure?