Git.vala
authorAlan Knowles <alan@roojs.com>
Thu, 7 Mar 2019 07:52:38 +0000 (15:52 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 7 Mar 2019 07:52:38 +0000 (15:52 +0800)
Git.vala

index bb117a2..c88a278 100644 (file)
--- a/Git.vala
+++ b/Git.vala
@@ -162,31 +162,33 @@ namespace  Git {
                        return ret;
                        */
                }
-       }
-       
-       public  Ggit.Cred netrc(string domain) 
-       {
-               string str;
-               GLib.FileUtils.get_contents(GLib.Environment.get_home_dir() + "/.netrc", out str);
-               var lines = str.split("\n");
-               for(var i=0; i< lines.length; i++) {
-                       // assumes one line per entry.. if not we are buggered...
-                       GLib.debug("got %s" , lines[i]);
-               
-                       var bits =  Regex.split_simple ("[ \t]+", lines[i].strip());
-                       if (bits.length < 6 || bits[0] != "machine" || bits[1] != domain) {
-                               continue;
-                       }
-                       GLib.debug("found password?");
-                       // we are gussing.... 
-                       return new Ggit.CredPlaintext(bits[3], bits[5]);
+               public  Ggit.Cred netrc(string domain) 
+               {
+                       string str;
+                       GLib.FileUtils.get_contents(GLib.Environment.get_home_dir() + "/.netrc", out str);
+                       var lines = str.split("\n");
+                       for(var i=0; i< lines.length; i++) {
+                               // assumes one line per entry.. if not we are buggered...
+                               GLib.debug("got %s" , lines[i]);
+                       
+                               var bits =  Regex.split_simple ("[ \t]+", lines[i].strip());
+                               if (bits.length < 6 || bits[0] != "machine" || bits[1] != domain) {
+                                       continue;
+                               }
+                               GLib.debug("found password?");
+                               // we are gussing.... 
+                               return new Ggit.CredPlaintext(bits[3], bits[5]);
 
-               }
-               return null;
+                       }
+                       return null;
 
 
+               
+               
+               }
+               
+       }
        
        
-       }
 
 }
\ No newline at end of file