]> gitweb.factorcode.org Git - factor.git/commitdiff
cli.git: Get directory entries without the .git directory.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Mar 2021 01:46:01 +0000 (19:46 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 11 Mar 2021 02:07:17 +0000 (20:07 -0600)
extra/cli/git/git.factor

index 6d586586328831c65028280303b6793310977155..9513b440510d73ae9b527d7f7d5a53f1e3417f27 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2017 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: arrays concurrency.combinators concurrency.semaphores fry
-io io.directories io.encodings.utf8 io.files.info io.launcher
-io.pathnames kernel math namespaces sequences splitting
-system-info unicode ;
+USING: accessors arrays concurrency.combinators
+concurrency.semaphores fry io io.directories io.encodings.utf8
+io.files.info io.launcher io.pathnames kernel math namespaces
+sequences splitting system-info unicode ;
 IN: cli.git
 
 SYMBOL: cli-git-num-parallel
@@ -60,3 +60,7 @@ cli-git-num-parallel [ cpus 2 * ] initialize
             _ [ update-repository ] with-semaphore
         ] parallel-each
     ] with-ensure-directory ;
+
+: directory-entries-without-git ( directory -- entries )
+    recursive-directory-entries
+    [ name>> "/.git/" swap subseq? ] reject ;
\ No newline at end of file