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>
master
Christopher Baines 2017-05-25 16:58:23 +01:00 committed by Ludovic Courtès
parent 294739b5b8
commit 151cb9738a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 2 additions and 1 deletions

View File

@ -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)))