1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-20 16:15:54 +02:00

git-download: Add support for Git Large File Storage (LFS).

* guix/build/git.scm (git-fetch) [lfs?]: New argument, doc and setup code.
(git-fetch-with-fallback) [lfs?]: New argument.  Pass it to git-fetch.
* guix/git-download.scm (git-lfs-package): New procedure.
(git-fetch/in-band*): New procedure, made of the logic of git-fetch/in-band,
with new git-lfs specifics, with the following changes:
New #:git-lfs argument.
<inputs>: Remove labels.  Conditionally add git-lfs.
<build>: Read "git lfs?" environment
variable and pass its value to the #:lfs? argument of git-fetch-with-fallback.
Use INPUTS directly; update comment.
<gexp->derivation>: Add "git lfs?" to #:env-vars.
(git-fetch/in-band): Express in terms of git-fetch/in-band*.
(git-fetch/lfs): New procedure.
* doc/guix.texi (origin Reference): Document it.

Change-Id: I5b233b8642a7bdb8737b9d9b740e7254a89ccb25
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxim Cournoyer
2023-10-22 23:41:22 -04:00
parent 889a6204f8
commit a4db19d8e0
3 changed files with 91 additions and 32 deletions
+7
View File
@@ -8375,6 +8375,13 @@ hash @var{hash} of type @var{hash-algo} (a symbol). Use @var{name} as
the file name, or a generic name if @code{#f}.
@end deffn
@deffn {Procedure} git-fetch/lfs ref hash-algo hash
This is a variant of the @code{git-fetch} procedure that supports the
Git @acronym{LFS, Large File Storage} extension. This may be useful to
pull some binary test data to run the test suite of a package, for
example.
@end deffn
@deftp {Data Type} git-reference
This data type represents a Git reference for @code{git-fetch} to
retrieve.