mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
Merge pull request #7975 from fricklerhandwerk/fix-fetchgit
remove indentation in `fetchGit` attribute listing
This commit is contained in:
commit
92771ca1be
@ -353,36 +353,44 @@ static RegisterPrimOp primop_fetchGit({
|
|||||||
of the repo at that URL is fetched. Otherwise, it can be an
|
of the repo at that URL is fetched. Otherwise, it can be an
|
||||||
attribute with the following attributes (all except `url` optional):
|
attribute with the following attributes (all except `url` optional):
|
||||||
|
|
||||||
- url\
|
- `url`
|
||||||
The URL of the repo.
|
|
||||||
|
|
||||||
- name\
|
The URL of the repo.
|
||||||
The name of the directory the repo should be exported to in the
|
|
||||||
store. Defaults to the basename of the URL.
|
|
||||||
|
|
||||||
- rev\
|
- `name` (default: *basename of the URL*)
|
||||||
The git revision to fetch. Defaults to the tip of `ref`.
|
|
||||||
|
|
||||||
- ref\
|
The name of the directory the repo should be exported to in the store.
|
||||||
The git ref to look for the requested revision under. This is
|
|
||||||
often a branch or tag name. Defaults to `HEAD`.
|
|
||||||
|
|
||||||
By default, the `ref` value is prefixed with `refs/heads/`. As
|
- `rev` (default: *the tip of `ref`*)
|
||||||
of Nix 2.3.0 Nix will not prefix `refs/heads/` if `ref` starts
|
|
||||||
with `refs/`.
|
|
||||||
|
|
||||||
- submodules\
|
The [Git revision] to fetch.
|
||||||
A Boolean parameter that specifies whether submodules should be
|
This is typically a commit hash.
|
||||||
checked out. Defaults to `false`.
|
|
||||||
|
|
||||||
- shallow\
|
[Git revision]: https://git-scm.com/docs/git-rev-parse#_specifying_revisions
|
||||||
A Boolean parameter that specifies whether fetching a shallow clone
|
|
||||||
is allowed. Defaults to `false`.
|
|
||||||
|
|
||||||
- allRefs\
|
- `ref` (default: `HEAD`)
|
||||||
Whether to fetch all refs of the repository. With this argument being
|
|
||||||
true, it's possible to load a `rev` from *any* `ref` (by default only
|
The [Git reference] under which to look for the requested revision.
|
||||||
`rev`s from the specified `ref` are supported).
|
This is often a branch or tag name.
|
||||||
|
|
||||||
|
[Git reference]: https://git-scm.com/book/en/v2/Git-Internals-Git-References
|
||||||
|
|
||||||
|
By default, the `ref` value is prefixed with `refs/heads/`.
|
||||||
|
As of 2.3.0, Nix will not prefix `refs/heads/` if `ref` starts with `refs/`.
|
||||||
|
|
||||||
|
- `submodules` (default: `false`)
|
||||||
|
|
||||||
|
A Boolean parameter that specifies whether submodules should be checked out.
|
||||||
|
|
||||||
|
- `shallow` (default: `false`)
|
||||||
|
|
||||||
|
A Boolean parameter that specifies whether fetching a shallow clone is allowed.
|
||||||
|
|
||||||
|
- `allRefs`
|
||||||
|
|
||||||
|
Whether to fetch all references of the repository.
|
||||||
|
With this argument being true, it's possible to load a `rev` from *any* `ref`
|
||||||
|
(by default only `rev`s from the specified `ref` are supported).
|
||||||
|
|
||||||
Here are some examples of how to use `fetchGit`.
|
Here are some examples of how to use `fetchGit`.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user