~ruther/guix-local

151cb9738a1903670acfee8cc28b5a2e441172ce — Christopher Baines 8 years ago 294739b
git-download: Fix 'git-predicate' to use absolute paths.

git ls-files will return paths relative to the repository directory. This
commit prepends the repository directory to those paths when calling lstat,
such that 'git-predicate' works if the current working directory is not the
repository directory.

* guix/git-download.scm (git-predicate): Prepend repository directory to the
  file path when calling lstat.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
1 files changed, 2 insertions(+), 1 deletions(-)

M guix/git-download.scm
M guix/git-download.scm => guix/git-download.scm +2 -1
@@ 146,7 146,8 @@ absolute file name and STAT is the result of 'lstat'."
                          (line
                           (loop (cons line lines))))))
         (inodes      (map (lambda (file)
                             (let ((stat (lstat file)))
                             (let ((stat (lstat
                                          (string-append directory "/" file))))
                               (cons (stat:dev stat) (stat:ino stat))))
                           files))
         (status      (close-pipe pipe)))