Currently we save no metadata about the file beyond its size and name (and hash ofc), which makes it a pretty poor achiving tool. So while having the timestamp change on every checkout is fine for git, for ARX this is unacceptable.
To this end we need to add some metadata to each file entry within a tree (as the same file content can appear with multiple bits of metadata :3)
- Timestamp
- rwx for User & Everyone (we can ignore Group since that also requires storing GID which brings with it possibility of vulnerabilities, as well as requiring the GID number to match across machines)
- hidden (windows only but only 1 bit)
- readonly (windows only but also costs only 1 bit)
This is the smallest amount of "Very required" features I could condense us into. All but the timestamp can be stored in a total of 8 Bits:
[ owner_rwx : 3 bits ] bits 0-2
[ other_rwx : 3 bits ] bits 3-5
[ win_hidden : 1 bit ] bit 6
[ win_rdonly : 1 bit ] bit 7
─────────────────────────────────
Total: 8 bits (1 byte)
The timestamp we will splurge on, so to preserve the most accuracy a 64 bits of nanoseconds is stored for every file, I feel 500 years is enough time and NS accuracy is provided by a lot of filesystems (some only have 100ns) so that way we never loose metadata.
We will also need a version byte on the archive to signal the binary format it adheres to. To this end we should probably also start on documenting this all in an RFC
Currently we save no metadata about the file beyond its size and name (and hash ofc), which makes it a pretty poor achiving tool. So while having the timestamp change on every checkout is fine for git, for ARX this is unacceptable.
To this end we need to add some metadata to each file entry within a tree (as the same file content can appear with multiple bits of metadata :3)
This is the smallest amount of "Very required" features I could condense us into. All but the timestamp can be stored in a total of 8 Bits:
The timestamp we will splurge on, so to preserve the most accuracy a 64 bits of nanoseconds is stored for every file, I feel 500 years is enough time and NS accuracy is provided by a lot of filesystems (some only have 100ns) so that way we never loose metadata.
We will also need a version byte on the archive to signal the binary format it adheres to. To this end we should probably also start on documenting this all in an RFC