(zilch lang rust resolver): fix Git fetches
Change-Id: I6c1214424e54f39ed955ae3e6758ce566a6a6964
This commit is contained in:
parent
3e70d61052
commit
bf1f5b0ed9
1 changed files with 2 additions and 2 deletions
|
|
@ -141,8 +141,8 @@
|
||||||
(create-directory repo #t)
|
(create-directory repo #t)
|
||||||
(let-values (((_ _ _) (process-wait (process-run "git" (list "init" "--bare" repo))))) #f))
|
(let-values (((_ _ _) (process-wait (process-run "git" (list "init" "--bare" repo))))) #f))
|
||||||
|
|
||||||
(define-values (_ commit-exists _) (process-wait (process-run "git" (list "-C" repo "cat-file" "-e" refspec))))
|
(define-values (_ normal-exit exit-code) (process-wait (process-run "git" (list "-C" repo "cat-file" "-e" refspec))))
|
||||||
(unless commit-exists
|
(unless (and normal-exit (= exit-code 0))
|
||||||
(let-values (((_ _ _) (process-wait (process-run "git" (list "-C" repo "fetch" "--write-fetch-head" url refspec))))) #f))
|
(let-values (((_ _ _) (process-wait (process-run "git" (list "-C" repo "fetch" "--write-fetch-head" url refspec))))) #f))
|
||||||
(define tree (read-git-tree repo (string-append refspec ":")))
|
(define tree (read-git-tree repo (string-append refspec ":")))
|
||||||
(define subdir (find-matching-cargo tree name))
|
(define subdir (find-matching-cargo tree name))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue