aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/content-address.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-19 15:18:19 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-19 15:26:59 +0000
commit2f0e395c99f926b9f0a65e37ea644a40ec5dddfa (patch)
treef9d8d6e0ae6e4b945f296484358d84e889a2ef11 /src/libstore/content-address.hh
parent3fc58a96387f55226ad78a0d8e765a0f041e8da0 (diff)
parentfb39a5e00c03c8fb3b893263e1d2b151c3ba11aa (diff)
Merge remote-tracking branch 'me/no-stringly-typed-derivation-output' into validPathInfo-ca-proper-datatype
Diffstat (limited to 'src/libstore/content-address.hh')
-rw-r--r--src/libstore/content-address.hh14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/libstore/content-address.hh b/src/libstore/content-address.hh
index 64d514751..ba4797f5b 100644
--- a/src/libstore/content-address.hh
+++ b/src/libstore/content-address.hh
@@ -12,22 +12,12 @@ enum struct FileIngestionMethod : uint8_t {
struct TextHash {
Hash hash;
- TextHash(const TextHash &) = default;
- TextHash(TextHash &&) = default;
- TextHash & operator = (const TextHash &) = default;
};
/// Pair of a hash, and how the file system was ingested
-struct FileSystemHash {
+struct FixedOutputHash {
FileIngestionMethod method;
Hash hash;
- FileSystemHash(FileIngestionMethod method, Hash hash)
- : method(std::move(method))
- , hash(std::move(hash))
- { }
- FileSystemHash(const FileSystemHash &) = default;
- FileSystemHash(FileSystemHash &&) = default;
- FileSystemHash & operator = (const FileSystemHash &) = default;
std::string printMethodAlgo() const;
};
@@ -44,7 +34,7 @@ struct FileSystemHash {
*/
typedef std::variant<
TextHash, // for paths computed by makeTextPath() / addTextToStore
- FileSystemHash // for path computed by makeFixedOutputPath
+ FixedOutputHash // for path computed by makeFixedOutputPath
> ContentAddress;
/* Compute the prefix to the hash algorithm which indicates how the files were