GitRepo.vala
[gitlive] / GitRepo.vala
index 1d037fc..2a3035a 100644 (file)
@@ -274,12 +274,12 @@ public class GitRepo : Object
         
     }
     
-    public delegate void GitAsyncCallback (string str)
+    public delegate void GitAsyncCallback (string str);
     public string pull_async(GitAsyncCallback cb) 
     {
     
         string[] cmd = { "pull" , "--no-edit" };
-        return this.git( cmd , cb);
+        return this.git_async( cmd , cb);
     
     }
     
@@ -353,7 +353,7 @@ public class GitRepo : Object
     }
        
        
-       public string git_async(GitAsyncCallback cb, string[] args_in ) throws Error, SpawnError
+       public string git_async( string[] args_in,   GitAsyncCallback cb ) throws Error, SpawnError
     {
         // convert arguments.
         
@@ -392,7 +392,7 @@ public class GitRepo : Object
 
        // may throw error...
         var sp = new Spawn(cfg);
-        cfg.onFinish((err) {
+        sp.run(((err) => {
                cb(sp.output);
         });
         stdout.printf( "GOT: %s\n" , sp.output);