hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit fe8920813b849b73e4b6b3d3ff27e9ed543b6258
parent 4e1fed8d369de1648fd56fe9921b3dbb42451ec5
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 14 Mar 2021 13:41:51 -0400

hare::module: assert that stat has what we need

Diffstat:
Mhare/module/manifest.ha | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hare/module/manifest.ha b/hare/module/manifest.ha @@ -42,7 +42,8 @@ export fn manifest_write(ctx: *context, manifest: *manifest) (void | error) = { let hash = hex::encode(input.hash); defer free(hash); - assert(input.stat.mask & fs::stat_mask::INODE == fs::stat_mask::INODE); + const want = fs::stat_mask::INODE | fs::stat_mask::MTIME; + assert(input.stat.mask & want == want); fmt::fprintfln(fd, "input {} {} {} {}", hash, input.path, input.stat.inode, time::unix(input.stat.mtime));