about summary refs log tree commit diff
path: root/src/libexpr/parser.y
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/parser.y
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/parser.y')
-rw-r--r--src/libexpr/parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index eee31522830f..7e63dc89f608 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -667,7 +667,7 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
         try {
             if (hasPrefix(elem.second, "git://") || hasSuffix(elem.second, ".git"))
                 // FIXME: support specifying revision/branch
-                res = { true, exportGit(store, elem.second, "master").storePath };
+                res = { true, exportGit(store, elem.second).storePath };
             else
                 res = { true, getDownloader()->downloadCached(store, elem.second, true) };
         } catch (DownloadError & e) {