mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 09:49:36 +01:00
WIP more progress
This commit is contained in:
parent
da39092a39
commit
754c910953
6 changed files with 28 additions and 25 deletions
|
|
@ -10,6 +10,10 @@ enum struct FileIngestionMethod : uint8_t {
|
|||
Recursive = true
|
||||
};
|
||||
|
||||
struct TextHash {
|
||||
Hash hash;
|
||||
};
|
||||
|
||||
/// Pair of a hash, and how the file system was ingested
|
||||
struct FileSystemHash {
|
||||
FileIngestionMethod method;
|
||||
|
|
@ -36,7 +40,7 @@ struct FileSystemHash {
|
|||
makeFixedOutputPath() / addToStore().
|
||||
*/
|
||||
typedef std::variant<
|
||||
Hash, // for paths computed by makeTextPath() / addTextToStore
|
||||
TextHash, // for paths computed by makeTextPath() / addTextToStore
|
||||
FileSystemHash // for path computed by makeFixedOutputPath
|
||||
> ContentAddress;
|
||||
|
||||
|
|
@ -48,4 +52,8 @@ std::string makeFileIngestionPrefix(const FileIngestionMethod m);
|
|||
for paths created by makeFixedOutputPath() / addToStore(). */
|
||||
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash);
|
||||
|
||||
std::string renderContentAddress(ContentAddress ca);
|
||||
|
||||
std::string renderContentAddress(std::optional<ContentAddress> ca);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue