diff options
-rwxr-xr-x | bin/tissue | 6 | ||||
-rw-r--r-- | tissue/git.scm | 9 |
2 files changed, 10 insertions, 5 deletions
@@ -30,6 +30,7 @@ (ice-9 popen) (ice-9 regex) (tissue conditions) + (tissue git) (tissue issue) (tissue tissue) (tissue utils) @@ -353,10 +354,7 @@ Show the text of issue #ISSUE-NUMBER. (memoize-thunk (lambda () "Load configuration and return <tissue-configuration> object." - (load (string-append (call-with-input-pipe - get-line - "git" "rev-parse" "--show-toplevel") - "/tissue.scm"))))) + (load (string-append (git-top-level) "/tissue.scm"))))) (define tissue-web (match-lambda* diff --git a/tissue/git.scm b/tissue/git.scm index bd9798d..50da06b 100644 --- a/tissue/git.scm +++ b/tissue/git.scm @@ -21,7 +21,14 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-171) #:use-module (tissue utils) - #:export (git-tracked-files)) + #:export (git-top-level + git-tracked-files)) + +(define (git-top-level) + "Return the top-level directory of the current git repository." + (call-with-input-pipe + get-line + "git" "rev-parse" "--show-toplevel")) (define (git-tracked-files) "Return a list of all files tracked in the current git repository." |