From a1b6d059d4b99507ff0ead16423556d550ae4ffc Mon Sep 17 00:00:00 2001 From: Saba Saba Date: Thu, 9 Feb 2023 12:26:16 -0500 Subject: [PATCH] Added some initial definitions for git helper methods. --- git-skipper.cl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/git-skipper.cl b/git-skipper.cl index 66a0c18..c50c084 100644 --- a/git-skipper.cl +++ b/git-skipper.cl @@ -5,3 +5,15 @@ (defmacro git (&rest arguments) `(mapcar (lambda (x) (string-trim " " x)) (cl-utilities:split-sequence #\newline (uiop:run-program (list "git" ,@arguments) :input nil :output :string)))) + +(defun modified-files () + (git "diff" "--name-only")) + +(defun skipped-files () + (git "ls-files" "-v")) + +(defun skip-file (file-path) + (git "update-index" "--skip-worktree" file-path)) + +(defun no-skip-file (file-path) + (git "update-index" "--no-skip-worktree" file-path)) -- 2.20.1