1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 21:46:01 +01:00

Use shared pointers in the memory source accessor

This allows aliasing, like hard links.
This commit is contained in:
John Ericson 2025-09-19 12:09:46 -04:00 committed by Sergei Zimmerman
parent f66b56ad3f
commit 4df60e639b
No known key found for this signature in database
3 changed files with 23 additions and 15 deletions

View file

@ -233,30 +233,30 @@ TEST_F(GitTest, both_roundrip)
.contents{
{
"foo",
File::Regular{
make_ref<File>(File::Regular{
.contents = "hello\n\0\n\tworld!",
},
}),
},
{
"bar",
File::Directory{
make_ref<File>(File::Directory{
.contents =
{
{
"baz",
File::Regular{
make_ref<File>(File::Regular{
.executable = true,
.contents = "good day,\n\0\n\tworld!",
},
}),
},
{
"quux",
File::Symlink{
make_ref<File>(File::Symlink{
.target = "/over/there",
},
}),
},
},
},
}),
},
},
};