From 7db5acd93b5fe73fb3b6961f99bc8a2d4e5664e8 Mon Sep 17 00:00:00 2001 From: sabadev Date: Sun, 11 Jul 2021 20:49:51 -0400 Subject: [PATCH] Removed unnecessary prints to improve execution time. --- git-skipper.rkt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/git-skipper.rkt b/git-skipper.rkt index 538efa3..5fb04fd 100644 --- a/git-skipper.rkt +++ b/git-skipper.rkt @@ -24,7 +24,7 @@ (define (update-index . args) (git "update-index" (string-join args))) (define (modified-files) (map cdr (ls-files "-m"))) -(define (skipped-files) (map cdr (filter (λ (pair) (equal? "S" (car pair))) (ls-files)))) +(define (skipped-files) (map cdr (ls-files "|" "findstr" "\"^S\""))) (define (skip-file file) (update-index "--skip-worktree" (file-string file))) (define (no-skip-file file) (update-index "--no-skip-worktree" (file-string file))) @@ -75,23 +75,19 @@ (define (program-skip-file file) (displayln (format "Skipping file: '~a'" file)) - (skip-file file) - (program-display-file-status)) + (skip-file file)) (define (program-no-skip-file file) (displayln (format "Unskipping file: '~a'" file)) - (no-skip-file file) - (program-display-file-status)) + (no-skip-file file)) (define (program-no-skip-all) (displayln "Unskipping every file") - (no-skip-all) - (program-display-file-status)) + (no-skip-all)) (define (program-skip-modified) (displayln "Skipping every modified file") - (skip-modified) - (program-display-file-status)) + (skip-modified)) (define (program-interactive) (displayln "Interactive mode") -- 2.20.1