From fd20c5ee31d4711aa823a91315251792ae5e182a Mon Sep 17 00:00:00 2001 From: Saba Saba Date: Thu, 9 Feb 2023 12:26:18 -0500 Subject: [PATCH] Finished off documentation. --- git-repl.cl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/git-repl.cl b/git-repl.cl index 84ed5ff..db6589a 100644 --- a/git-repl.cl +++ b/git-repl.cl @@ -33,6 +33,7 @@ :omit-nulls t)))) (defun-public git (&rest arguments) + "Runs an arbitrary git command. Separate each token as a string, for example: (git \"add\" \"-i\")" (run-command (str:join " " (cons "git" arguments)))) (defun-public help () @@ -41,46 +42,58 @@ (format t "~a~%" sym))) (defun-public status () + "Displays the current status of the repository" (git "status")) (defun-public add-all () + "Adds every file under the current directory. Executes \'git add .\'" (git "add" ".")) (defun-public commit () + "Performs a verbose commit" (git "commit" "-v")) (defun-public modified-files () + "Displays a list of modified, unstaged files" (git "diff" "--name-only")) (defun-public skipped-files () + "Displays a list of skipped files" (mapcar (lambda (x) (str:substring 2 t x)) (git "ls-files" "-v" "|" *grep* "^S"))) (defun-public skip-file (file-path) + "Given a filepath, skips the specified file" (git "update-index" "--skip-worktree" file-path)) (defun-public no-skip-file (file-path) + "Given a filepath, unskips the specified file" (git "update-index" "--no-skip-worktree" file-path)) (defun-public skip-modified () + "Skips every modified file" (mapcar #'skip-file (modified-files))) (defun-public no-skip-all () + "Unskips every skipped file" (mapcar #'no-skip-file (skipped-files))) (defun-public save-stash () + "Stashes every modified file" (git "stash")) (defun-public pop-stash () + "Pops the top stash entry" (git "stash" "pop")) (defun-public stash-config () + "Stashes your current configuration by first unskipping it and then stashing it. This operation fails if you have any modified files." (clean-working-directory (progn (no-skip-all) (save-stash)))) (defun-public pop-config () - "Pops the stash and skips it to store it as your configuration" + "Pops the stash and skips it to store it as your configuration. This operation fails if you have any modified files." (clean-working-directory (progn (pop-stash) -- 2.20.1