From e38382895deef4c136b7425f480884d122f3c5ae Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Oct 2017 11:49:03 +0100 Subject: builtins.fetchGit: Return an attrset with revision info This adds rev, shortRev and revCount attributes, equal to what Hydra provides. E.g. $ nix eval '(fetchGit https://github.com/NixOS/patchelf.git)' { outPath = "/nix/store/ghigrkw02l440g8vfxa9wj4c3zpfmw99-source"; rev = "29c085fd9d3fc972f75b3961905d6b4ecce7eb2b"; revCount = 303; shortRev = "29c085f"; } --- src/libexpr/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/parser.y') diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 669312bb7cff..eee31522830f 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -667,7 +667,7 @@ std::pair 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") }; + res = { true, exportGit(store, elem.second, "master").storePath }; else res = { true, getDownloader()->downloadCached(store, elem.second, true) }; } catch (DownloadError & e) { -- cgit 1.4.1