1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

Merge pull request #11908 from Mic92/pull-request

document shallow clone options in git fetchers
This commit is contained in:
tomberek 2024-11-22 09:26:11 -05:00 committed by GitHub
commit 3e9cc78eb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -245,6 +245,9 @@ Currently the `type` attribute can be one of the following:
* `./sub/dir` (when used on the command line and `dir/flake.nix` is in a git repository)
* `git+https://example.org/my/repo`
* `git+https://example.org/my/repo?dir=flake1`
* `git+https://example.org/my/repo?shallow=1` A shallow clone of the repository.
For large repositories, the shallow clone option can significantly speed up fresh clones compared
to non-shallow clones, while still providing faster updates than other fetch methods such as `tarball:` or `github:`.
* `git+ssh://git@github.com/NixOS/nix?ref=v1.2.3`
* `git://github.com/edolstra/dwarffs?ref=unstable&rev=e486d8d40e626a20e06d792db8cc5ac5aba9a5b4`
* `git+file:///home/my-user/some-repo/some-repo`