diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index 66cbd6283..584dc2806 100644 --- a/src/libexpr/primops/fetchTree.cc +++ b/src/libexpr/primops/fetchTree.cc @@ -225,7 +225,7 @@ static void fetchTree( params.emptyRevFallback, false); - //state.allowPath(tree.storePath); + state.allowPath(tree.storePath); } } diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 711319659..4379d497c 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -71,7 +71,8 @@ std::optional readHead(const Path & path) }); if (status != 0) return std::nullopt; - std::string_view line = output.substr(0, line.find("\n")); + std::string_view line = output; + line = line.substr(0, line.find("\n")); if (const auto parseResult = git::parseLsRemoteLine(line)) { switch (parseResult->kind) { case git::LsRemoteRefLine::Kind::Symbolic: