diff options
author | Arun Isaac | 2022-04-05 14:25:08 +0530 |
---|---|---|
committer | Arun Isaac | 2022-04-05 14:30:22 +0530 |
commit | 4bbaea54a4d549912aa773311cbda9fe659b9c0c (patch) | |
tree | b23f82ab9a029d0dfa2b469219815efb8d58a13d /tissue/git.scm | |
parent | 5206de9b15d46d703161565cdb6909bcf5c10f97 (diff) | |
download | tissue-4bbaea54a4d549912aa773311cbda9fe659b9c0c.tar.gz tissue-4bbaea54a4d549912aa773311cbda9fe659b9c0c.tar.lz tissue-4bbaea54a4d549912aa773311cbda9fe659b9c0c.zip |
git: Abstract out `git ls-files'.
* tissue/git.scm: New file.
* tissue/issue.scm: Import (tissue git).
(issues): Use git-tracked-files.
Diffstat (limited to 'tissue/git.scm')
-rw-r--r-- | tissue/git.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tissue/git.scm b/tissue/git.scm new file mode 100644 index 0000000..bd9798d --- /dev/null +++ b/tissue/git.scm @@ -0,0 +1,30 @@ +;;; tissue --- Text based issue tracker +;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> +;;; +;;; This file is part of tissue. +;;; +;;; tissue is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; tissue is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with tissue. If not, see <https://www.gnu.org/licenses/>. + +(define-module (tissue git) + #:use-module (rnrs io ports) + #:use-module (srfi srfi-26) + #:use-module (srfi srfi-171) + #:use-module (tissue utils) + #:export (git-tracked-files)) + +(define (git-tracked-files) + "Return a list of all files tracked in the current git repository." + (call-with-input-pipe + (cut port-transduce (tmap identity) rcons get-line <>) + "git" "ls-files")) |