mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Update nix flake
documentation of ref
handling
Update the documentation about how `ref` is resolved if it is not specified. Add a note about special handling of local workdirs with `git+file`.
This commit is contained in:
parent
1203e48926
commit
c21afd684c
1 changed files with 6 additions and 1 deletions
|
@ -153,7 +153,7 @@ Currently the `type` attribute can be one of the following:
|
|||
git(+http|+https|+ssh|+git|+file|):(//<server>)?<path>(\?<params>)?
|
||||
```
|
||||
|
||||
The `ref` attribute defaults to `master`.
|
||||
The `ref` attribute defaults to resolving the `HEAD` reference.
|
||||
|
||||
The `rev` attribute must denote a commit that exists in the branch
|
||||
or tag specified by the `ref` attribute, since Nix doesn't do a full
|
||||
|
@ -161,6 +161,11 @@ Currently the `type` attribute can be one of the following:
|
|||
doesn't allow fetching a `rev` without a known `ref`). The default
|
||||
is the commit currently pointed to by `ref`.
|
||||
|
||||
When `git+file` is used without specifying `ref` or `rev`, files are
|
||||
fetched directly from the local `path` as long as they have been added
|
||||
to the Git repository. If there are uncommitted changes, the reference
|
||||
is treated as dirty and a warning is printed.
|
||||
|
||||
For example, the following are valid Git flake references:
|
||||
|
||||
* `git+https://example.org/my/repo`
|
||||
|
|
Loading…
Reference in a new issue