about summary refs log tree commit diff
path: root/src/libexpr/primops/fetchgit.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-10-30T18·57+0100
committerEelco Dolstra <edolstra@gmail.com>2017-10-30T18·59+0100
commit72cd52c3cdd1fc465fade6d553b3823aca9f8b6e (patch)
tree403a3d512f405a98cf304e1568dadb13f4c79e0b /src/libexpr/primops/fetchgit.hh
parent197922ea4e76ec9439d487e2d16411495a71df4e (diff)
builtins.fetchgit: Support importing a working tree
For example, you can write

  src = fetchgit ./.;

and if ./. refers to an unclean working tree, that tree will be copied
to the Nix store. This removes the need for "cleanSource".
Diffstat (limited to 'src/libexpr/primops/fetchgit.hh')
-rw-r--r--src/libexpr/primops/fetchgit.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops/fetchgit.hh b/src/libexpr/primops/fetchgit.hh
index 056b6fcbe78d..818ab7102e97 100644
--- a/src/libexpr/primops/fetchgit.hh
+++ b/src/libexpr/primops/fetchgit.hh
@@ -17,7 +17,8 @@ struct GitInfo
 };
 
 GitInfo exportGit(ref<Store> store, const std::string & uri,
-    const std::string & ref, const std::string & rev = "",
+    std::experimental::optional<std::string> ref = {},
+    const std::string & rev = "",
     const std::string & name = "");
 
 }