From: sabadev Date: Mon, 12 Jul 2021 00:49:50 +0000 (-0400) Subject: Added a skipped-files method. X-Git-Url: http://sabadev.xyz:4321/?a=commitdiff_plain;h=ef10c0a6386a12cca689dc1c7f2364ab9a5f9e80;p=git-skipper.git Added a skipped-files method. --- diff --git a/git-skipper.rkt b/git-skipper.rkt index fe05ed3..e6ce564 100644 --- a/git-skipper.rkt +++ b/git-skipper.rkt @@ -8,11 +8,13 @@ (define (split-prefix str) (define components (string-split str)) - (define prefix (car components)) + (define head (car components)) (define tail (string-join (list-tail components 1))) - (cons prefix tail)) + (cons head tail)) -(define (ls-files arg) (map split-prefix (git "ls-files" "-v" arg))) +(define (ls-files . args) (map split-prefix (git "ls-files" "-v" (string-join args)))) (define (modified-files) (ls-files "-m")) +(define (skipped-files) (filter (λ (pair) (equal? "S" (car pair))) (ls-files))) +(skipped-files) (modified-files)