GitRepo.vala
[gitlive] / GitRepo.vala
index c570d77..63d14a9 100644 (file)
@@ -275,9 +275,11 @@ public class GitRepo : Object
     }
     
     public delegate void GitAsyncCallback (string str)
-    async public string pull_async(GitAsyncCallback cb) {
+    public string pull_async(GitAsyncCallback cb) 
+    {
     
-         
+        string[] cmd = { "pull" , "--no-edit" };
+        return this.git_async( cmd , cb);
     
     }
     
@@ -386,14 +388,13 @@ public class GitRepo : Object
 
         var cfg = new SpawnConfig(this.git_working_dir , args , env);
         cfg.async = true;
-        cfg.onFinish((err) {
-               this.
-        });
+       
 
        // may throw error...
         var sp = new Spawn(cfg);
-      
-
+        cfg.onFinish((err) {
+               cb(sp.output);
+        });
         stdout.printf( "GOT: %s\n" , sp.output);
         // parse output for some commands ?
         return sp.output;