mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
Documentation: builtins.fetchGit when used on a local path (#7706)
* Documentation: builtins.fetchGit when used on a local path Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
parent
ec788964e9
commit
e4a2a5c074
@ -456,6 +456,17 @@ static RegisterPrimOp primop_fetchGit({
|
||||
> **Note**
|
||||
>
|
||||
> This behavior is disabled in *Pure evaluation mode*.
|
||||
|
||||
- To fetch the content of a checked-out work directory:
|
||||
|
||||
```nix
|
||||
builtins.fetchGit ./work-dir
|
||||
```
|
||||
|
||||
If the URL points to a local directory, and no `ref` or `rev` is
|
||||
given, `fetchGit` will use the current content of the checked-out
|
||||
files, even if they are not committed or added to Git's index. It will
|
||||
only consider files added to the Git repository, as listed by `git ls-files`.
|
||||
)",
|
||||
.fun = prim_fetchGit,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user