aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-19 18:41:33 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-19 21:48:57 +0000
commit507aa48739f23f9a16c8b7079bfa6fc1806be78e (patch)
tree24e0215c57af6099c949047c3de6bf24edea9346 /src/libfetchers
parent984e521392b3f41f7cdab203e5c00f3e00e27a28 (diff)
WIP: Make Hash always store a valid hash type
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/tree-info.cc2
-rw-r--r--src/libfetchers/tree-info.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libfetchers/tree-info.cc b/src/libfetchers/tree-info.cc
index b2d8cfc8d..432aa6182 100644
--- a/src/libfetchers/tree-info.cc
+++ b/src/libfetchers/tree-info.cc
@@ -8,7 +8,7 @@ namespace nix::fetchers {
StorePath TreeInfo::computeStorePath(Store & store) const
{
assert(narHash);
- return store.makeFixedOutputPath(FileIngestionMethod::Recursive, narHash, "source");
+ return store.makeFixedOutputPath(FileIngestionMethod::Recursive, *narHash, "source");
}
}
diff --git a/src/libfetchers/tree-info.hh b/src/libfetchers/tree-info.hh
index 2c7347281..9d1872097 100644
--- a/src/libfetchers/tree-info.hh
+++ b/src/libfetchers/tree-info.hh
@@ -11,7 +11,7 @@ namespace nix::fetchers {
struct TreeInfo
{
- Hash narHash;
+ std::optional<Hash> narHash;
std::optional<uint64_t> revCount;
std::optional<time_t> lastModified;