diff options
author | Arun Isaac | 2022-02-28 15:07:29 +0530 |
---|---|---|
committer | Arun Isaac | 2022-02-28 18:11:03 +0530 |
commit | 03400cab3490e6e21ee886083a2664ab32512b8f (patch) | |
tree | 832245a682eafeee2ca9360cfbfe154969d5b2a0 /forge | |
parent | 672556e2d9ff776d293f8fcdb250d0522f42f356 (diff) | |
download | guix-forge-03400cab3490e6e21ee886083a2664ab32512b8f.tar.gz guix-forge-03400cab3490e6e21ee886083a2664ab32512b8f.tar.lz guix-forge-03400cab3490e6e21ee886083a2664ab32512b8f.zip |
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.
Diffstat (limited to 'forge')
-rw-r--r-- | forge/build/git.scm | 7 |
1 files changed, 6 insertions, 1 deletions
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)) |