]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/mason/git/git.factor
core: subseq-index? -> subseq-of?
[factor.git] / extra / mason / git / git.factor
index 1a9954f8b45d148d3d505e676667eee697237bde..9cccf438c74b6e2b9d6a590af8a92c6a35fbc63b 100644 (file)
@@ -7,8 +7,8 @@ splitting ;
 IN: mason.git
 
 : git-id ( -- id )
-    { "git" "show" } utf8 [ lines ] with-process-reader
-    first " " split second ;
+    { "git" "show" } utf8 [ read-lines ] with-process-reader
+    first split-words second ;
 
 <PRIVATE
 
@@ -16,7 +16,7 @@ IN: mason.git
     {
         "git"
         "clone"
-        "git://github.com/factor/factor.git"
+        "https://github.com/factor/factor.git"
     } ;
 
 : git-clone ( -- )
@@ -28,7 +28,7 @@ IN: mason.git
     {
         "git"
         "pull"
-        "git://github.com/factor/factor.git"
+        "https://github.com/factor/factor.git"
         "master"
     } ;
 
@@ -47,7 +47,7 @@ IN: mason.git
 
 : git-pull-failed ( error -- )
     dup output-process-error? [
-        dup output>> "not uptodate. Cannot merge." swap subseq?
+        dup output>> "not uptodate. Cannot merge." subseq-of?
         [ git-repo-corrupted ]
         [ rethrow ]
         if
@@ -57,7 +57,7 @@ IN: mason.git
     { "git" "status" "--porcelain" } ;
 
 : git-status ( -- seq )
-    git-status-cmd utf8 [ lines ] with-process-reader ;
+    git-status-cmd utf8 [ read-lines ] with-process-reader ;
 
 : check-repository ( -- seq )
     "factor" [ git-status ] with-directory ;
@@ -78,7 +78,7 @@ PRIVATE>
 
 : git-clone-or-pull ( -- id )
     ! Must be run from builds-dir.
-    "factor" exists? [
+    "factor" file-exists? [
         check-repository [
             "factor" [
                 [ git-pull-cmd short-running-process ]