diff options
Diffstat (limited to 'tissue/git.scm')
-rw-r--r-- | tissue/git.scm | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tissue/git.scm b/tissue/git.scm index 4289d65..70f0de9 100644 --- a/tissue/git.scm +++ b/tissue/git.scm @@ -45,7 +45,6 @@ commit-author-date git-tracked-file? git-tracked-files - call-with-file-in-git file-modification-table clone-options call-with-temporary-checkout)) @@ -132,27 +131,6 @@ directory." directory of @var{repository} and do not have a leading slash." (tree-list (head-tree repository))) -(define (call-with-file-in-git repository path proc) - "Call PROC on an input port reading contents of PATH. PATH may refer -to a file on the filesystem or in REPOSITORY." - (let ((file-path (if (absolute-file-name? path) - ;; Treat absolute paths verbatim. - path - ;; Treat relative paths as relative to the - ;; top-level of the git repository. - (string-append (dirname (repository-directory repository)) - "/" path)))) - (if (file-exists? file-path) - ;; If file exists on the filesystem, read it. - (call-with-input-file file-path proc) - ;; Else, read the file from the repository. - (let* ((path-tree-entry (tree-entry-bypath (head-tree repository) - path)) - (path-object (tree-entry->object repository path-tree-entry)) - (blob (blob-lookup repository (object-id path-object)))) - (call-with-port (open-bytevector-input-port (blob-content blob)) - proc))))) - (define (commit-file-changes repository commit) "Return a list of pairs describing files modified by COMMIT with respect to its first parent in REPOSITORY. Each pair maps the old |