From bf1f5b0ed90ac69a6ae3fcf98b16b15d81db8315 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Mon, 24 Nov 2025 18:37:10 +0000 Subject: [PATCH] (zilch lang rust resolver): fix Git fetches Change-Id: I6c1214424e54f39ed955ae3e6758ce566a6a6964 --- lang/rust/src/registry.sld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/rust/src/registry.sld b/lang/rust/src/registry.sld index 2578cda..d1d38d9 100644 --- a/lang/rust/src/registry.sld +++ b/lang/rust/src/registry.sld @@ -141,8 +141,8 @@ (create-directory repo #t) (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)))) - (unless commit-exists + (define-values (_ normal-exit exit-code) (process-wait (process-run "git" (list "-C" repo "cat-file" "-e" refspec)))) + (unless (and normal-exit (= exit-code 0)) (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 subdir (find-matching-cargo tree name))