From: Saba Saba Date: Thu, 9 Feb 2023 17:26:16 +0000 (-0500) Subject: Added some initial definitions for git helper methods. X-Git-Url: http://sabadev.xyz:4321/?a=commitdiff_plain;h=a1b6d059d4b99507ff0ead16423556d550ae4ffc;p=git-repl.git Added some initial definitions for git helper methods. --- 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))