Browse Source

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>
wip-gexp-hygiene
Christopher Baines 5 years ago
committed by Ludovic Courtès
parent
commit
151cb9738a
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 3
      guix/git-download.scm

3
guix/git-download.scm

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

Loading…
Cancel
Save