diff options
author | Arun Isaac | 2023-01-29 21:54:16 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-29 22:40:34 +0000 |
commit | 7d9615bd0ea68118fdcff0765100cf5d73e81e58 (patch) | |
tree | ea99280507a1f1a2e011e0d9ee5fba641f6e754a /tissue/file-document.scm | |
parent | d2680d358df6666b4b821662e1740d9668df29af (diff) | |
download | tissue-7d9615bd0ea68118fdcff0765100cf5d73e81e58.tar.gz tissue-7d9615bd0ea68118fdcff0765100cf5d73e81e58.tar.lz tissue-7d9615bd0ea68118fdcff0765100cf5d73e81e58.zip |
git: Deprecate call-with-file-in-git.
Functions called by call-with-file-in-git may expect to read files
directly off the filesystem. These functions are not all within the
user's control and cannot be rewritten to do otherwise. It is more
robust to provide a filesystem checkout of the git repository like
these functions expect. In this commit, we deprecate
call-with-file-in-git and replace calls to it with
call-with-input-file. These invocations have been arranged such that
they all happen at the top level of a repository checkout.
* tissue/git.scm (call-with-file-in-git): Delete function.
* .dir-locals.el (scheme-mode): Unregister it.
* bin/tissue (tissue-show, load-config),
tissue/file-document.scm (file-text, read-gemtext-document),
tissue/issue.scm (read-gemtext-issue): Replace call-with-file-in-git
with call-with-input-file.
(pull, tissue-web): Call load-config from the top level of a
repository checkout.
Diffstat (limited to 'tissue/file-document.scm')
-rw-r--r-- | tissue/file-document.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tissue/file-document.scm b/tissue/file-document.scm index ccd6a48..f389976 100644 --- a/tissue/file-document.scm +++ b/tissue/file-document.scm @@ -71,7 +71,7 @@ (define (file-text file) "Return the contents of text @var{file}." - (call-with-file-in-git (current-git-repository) file + (call-with-input-file file get-string-all)) (define-method (document-text (document <file-document>)) @@ -139,7 +139,7 @@ MSet object representing a list of search results." "Read gemtext document from @var{file} and return a @code{<file-document>} object." (make <file-document> - #:title (or (call-with-file-in-git (current-git-repository) file + #:title (or (call-with-input-file file (lambda (port) (port-transduce (tfilter-map (lambda (line) ;; The first level one |