From 1fcaf4416e910ef2a2c7f8e412146b9a4f11b593 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Thu, 17 Oct 2024 20:40:59 -0700 Subject: [PATCH] chore: cleanup porcelain.lisp --- porcelain.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/porcelain.lisp b/porcelain.lisp index 3f044e1..f46f776 100644 --- a/porcelain.lisp +++ b/porcelain.lisp @@ -1,6 +1,5 @@ (in-package :fwoar.cl-git) -;; TODO: Update the code so this uses an object instead of a path. (defvar *git-repository*) (setf (documentation '*git-repository* 'variable) "The git repository path for porcelain commands to operate on.") @@ -8,14 +7,14 @@ (defvar *git-encoding* :utf-8 "The encoding to use when parsing git objects") +(defun co.fwoar.git:repository () + *git-repository*) + (defun co.fwoar.git:in-repository (root) (setf *git-repository* (ensure-repository (truename root)))) -(defun co.fwoar.git:repository () - *git-repository*) - (defmacro co.fwoar.git:with-repository ((root) &body body) `(let ((*git-repository* (ensure-repository ,root))) ,@body))