summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-23 18:06:28 +0530
committerArun Isaac2022-06-23 19:06:40 +0530
commitd2427c7a2102720e86323f17ba8da1174d40880c (patch)
treecf9f6729911bd2935efe4ee0941296ca0491b040
parentbddf05502aadd0936a3211a710bb09f564222b3e (diff)
downloadtissue-d2427c7a2102720e86323f17ba8da1174d40880c.tar.gz
tissue-d2427c7a2102720e86323f17ba8da1174d40880c.tar.lz
tissue-d2427c7a2102720e86323f17ba8da1174d40880c.zip
git: Pass repository argument to git-tracked-files.
Accepting a repository argument makes git-tracked-files a better stand-alone utility. * tissue/git.scm (git-tracked-files): Accept repository argument. * tissue/tissue.scm (gemtext-files-in-directory): Pass repository argument to git-tracked-files.
-rw-r--r--tissue/git.scm11
-rw-r--r--tissue/tissue.scm2
2 files changed, 6 insertions, 7 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 84dd1ec..c31ebd1 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -175,10 +175,9 @@ repository."
"Return the current git repository."
(repository-open (git-top-level)))
-(define (git-tracked-files)
- "Return a list of all files tracked in the current git repository. The
-returned filenames are relative to the top-level directory of the
-current git repository and do not have a leading slash."
+(define (git-tracked-files repository)
+ "Return a list of all files tracked in REPOSITORY. The returned
+filenames are relative to the top-level directory of REPOSITORY and do
+not have a leading slash."
(map index-entry-path
- (index-entries (repository-index
- (repository-open (git-top-level))))))
+ (index-entries (repository-index repository))))
diff --git a/tissue/tissue.scm b/tissue/tissue.scm
index 194587d..decd630 100644
--- a/tissue/tissue.scm
+++ b/tissue/tissue.scm
@@ -53,7 +53,7 @@ which directory they are in."
(and (or (not directory)
(string-prefix? directory filename))
(string-suffix? ".gmi" filename)))
- (git-tracked-files)))
+ (git-tracked-files (current-git-repository))))
(define-syntax tissue-configuration
(lambda (x)