From 03400cab3490e6e21ee886083a2664ab32512b8f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 28 Feb 2022 15:07:29 +0530 Subject: forge: Append file:// to local git repository URLs before cloning. Shallow clone works on local git repositories only with a file:// URL. * forge/build/git.scm (download-git-to-store): Append file:// to local git repository URLs. --- forge/build/git.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forge/build/git.scm b/forge/build/git.scm index 5978a3e..1434d07 100644 --- a/forge/build/git.scm +++ b/forge/build/git.scm @@ -55,7 +55,12 @@ downloaded. git and certificates should be in the environment." (invoke-error-exit-status condition)) (exit #f))) (apply invoke - "git" "clone" "--quiet" "--depth" "1" url + "git" "clone" "--quiet" "--depth" "1" + ;; Append file:// to local repository path so that + ;; shallow clone works. + (if (string-prefix? "/" url) + (string-append "file://" url) + url) (append (if branch (list "--branch" branch) (list)) -- cgit v1.2.3