diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2023-02-08 12:53:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 11:53:28 +0000 |
commit | e4a2a5c074f8faf947a8864ca2acea85a8fc6ab7 (patch) | |
tree | b571d139bdda2ea8d0f651f55a1de8d77f11d07b /src/libexpr | |
parent | ec788964e91e0bf17eae5aac6b5dc0ab79c18c11 (diff) |
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>
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops/fetchTree.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index 83d93b75c..2e924c302 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -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, }); |