From 35f01df035950fb83f9be0af150bb0683b69fc66 Mon Sep 17 00:00:00 2001 From: Saba Saba Date: Thu, 9 Feb 2023 12:26:19 -0500 Subject: [PATCH] Implemented config-diff --- git-repl.cl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/git-repl.cl b/git-repl.cl index 0e1c6b3..00e3784 100644 --- a/git-repl.cl +++ b/git-repl.cl @@ -14,6 +14,14 @@ ,@body (write-line "You have modified files. Please stash or commit your files before proceeding."))) +(defmacro config-do (&body body) + "Unskips your configuration, executes the provided body, then skips your configuration" + `(clean-working-directory + (progn + (no-skip-all) + ,@body + (skip-modified)))) + (defun add-quotes (text) (format nil "\"~a\"" text)) @@ -119,6 +127,10 @@ (write-line "Skipping files...") (skip-modified)))) +(defun-public config-diff (file-path) + "Saves the current configuration to the specified file" + (config-do (mapcar #'write-line (git "diff")))) + (defun-public delete-branch (branch-name) "Deletes the given local branch name" (git "branch" "-d" branch-name)) -- 2.20.1