Added methods to execute 'git ls-files'.
authorsabadev <saba@sabadev.xyz>
Mon, 12 Jul 2021 00:49:50 +0000 (20:49 -0400)
committersabadev <saba@sabadev.xyz>
Mon, 12 Jul 2021 00:49:50 +0000 (20:49 -0400)
git-skipper.rkt

index 7bc35af..2d7d35f 100644 (file)
@@ -1 +1,12 @@
 #lang racket/base
+
+(require racket/system
+         racket/port
+         racket/string)
+
+(define (git . args) (string-split (with-output-to-string (λ () (system (string-join (cons "git" args))))) "\n"))
+
+(define (ls-files arg) (git "ls-files" "-v" arg))
+(define (modified-files) (ls-files "-m"))
+
+(modified-files)