GitRepo.vala
[gitlive] / GitRepo.vala
index 42202d3..a72d562 100644 (file)
@@ -163,14 +163,18 @@ public class GitRepo : Object
         
     public bool is_ignore(string fname) throws Error, SpawnError
     {
+               if (fname == ".gitignore") {
+                       this.ignore_files.clear();
+               }
+               
                if (this.ignore_files.has_key(fname)) {
                        return this.ignore_files.get(fname);
                }
                
                try {
                        var ret = this.git( { "check-ignore" , fname } );
-                       this.ignore_files.set(fname, ret == fname);
-                       return ret == fname;
+                       this.ignore_files.set(fname, ret.length >  0);
+                       return ret.length > 0;
                } catch (SpawnError e) {
                        this.ignore_files.set(fname, false);
                        return false;
@@ -207,6 +211,7 @@ public class GitRepo : Object
 
     }
     
+    
     /**
      * commit:
      * perform a commit.
@@ -266,9 +271,18 @@ public class GitRepo : Object
         string[] cmd = { "pull" , "--no-edit" };
         return this.git( cmd );
 
+        //var e = yield dir.enumerate_children_async(
+        //    FileAttribute.STANDARD_NAME, 0, Priority.DEFAULT, null);
         
         
     }
+    
+    
+    async public void pull_async(Callback_pull cb) {
+    
+    
+    }
+    
     /**
      * push:
      * Send local changes to remote repo(s)