GitRepo.vala
authorAlan Knowles <alan@roojs.com>
Thu, 21 Mar 2019 03:57:35 +0000 (11:57 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 21 Mar 2019 03:57:35 +0000 (11:57 +0800)
GitRepo.vala

index c5ed9ee..21cf4de 100644 (file)
@@ -989,7 +989,7 @@ public class GitRepo : Object
                return true;
                        
                };
-               new Thread<bool>("thread-new-gitpull-" this.repo.name, run);
+               new Thread<bool>("thread-new-gitpull-" + this.name, run);
                yield;
                   
        
@@ -998,7 +998,7 @@ public class GitRepo : Object
        
        public static void updateAllAsync(string after)
        {
-               var done = 0;
                
                var doing = new  Gee.HashMap<string,bool>();;
                
@@ -1014,21 +1014,15 @@ public class GitRepo : Object
                        repo.doUpdate.begin((obj, res) => {
                                repo.doUpdate.end(res);
                                doing.set(repo.name, false);
-                               done++;
-                               GLib.debug("total %d ?= done %d", update_all_total, done);
-                               
-                               if (update_all_total - done  < 10) {
-                                       foreach(var b in doing.keys) {
-                                               if (doing.get(b)) {
-                                                       GLib.debug("pending: %s", b);
-                                               }
+                                
+                               foreach(var b in doing.keys) {
+                                       if (doing.get(b)) {
+                                               GLib.debug("pending: %s", b);
+                                               return;
                                        }
-                               
-                               }
-                               
-                               if (update_all_total != done) {
-                                       return;
                                }
+                       
+                               
                                switch (after) {
                                        case "show_clones":
                                                Clones.singleton().show();