aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-04-28 10:16:27 +0200
committerValentin Gagarin <valentin.gagarin@tweag.io>2022-08-04 12:37:47 +0200
commite5e48593c85d052585ff8a275c54823caf575a9d (patch)
treec5445ecec4e3f2cf71a557fef0a470e4c1f0c697 /doc/manual/src
parenta145007a577fda8a8f3b65b66f4c359410b4af82 (diff)
move git comparison to related work
it should be pulled out of the branch before we go for merging
Diffstat (limited to 'doc/manual/src')
-rw-r--r--doc/manual/src/architecture/store/objects.md23
-rw-r--r--doc/manual/src/architecture/store/related-work.md24
2 files changed, 24 insertions, 23 deletions
diff --git a/doc/manual/src/architecture/store/objects.md b/doc/manual/src/architecture/store/objects.md
index e4f49a170..caa00d862 100644
--- a/doc/manual/src/architecture/store/objects.md
+++ b/doc/manual/src/architecture/store/objects.md
@@ -31,29 +31,6 @@ In particular, every file system object falls into these three cases:
A bare file or symlink as the "root" file system object is allowed.
-### Comparison with Git
-
-This is close to Git's model, but with one crucial difference:
-Git puts the "permission" info within the directory map's values instead of making it part of the file (blob, in it's parlance) object.
-
- data GitObject
- = Blob ByteString
- | Tree (Map FileName (Persission, FSO))
-
- data Persission
- = Directory -- IFF paired with tree
- -- Iff paired with blob, one of:
- | RegFile
- | ExecutableFile
- | Symlink
-
-So long as the root object is a directory, the representations are isomorphic.
-There is no "wiggle room" the git way since whenever the permission info wouldn't matter (e.g. the child object being mapped to is a directory), the permission info must be a sentinel value.
-
-However, if the root object is a blob, there is loss of fidelity.
-Since the permission info is used to distinguish executable files, non-executable files, and symlinks, but there isn't a "parent" directory of the root to contain that info, these 3 cases cannot be distinguished.
-
-Git's model matches Unix tradition, but Nix's model is more natural.
## References
diff --git a/doc/manual/src/architecture/store/related-work.md b/doc/manual/src/architecture/store/related-work.md
index b64b41988..92b7d480e 100644
--- a/doc/manual/src/architecture/store/related-work.md
+++ b/doc/manual/src/architecture/store/related-work.md
@@ -25,6 +25,30 @@ Do we have open terms?
Do we hve thunks vs expressions distinction?
c.f. John Shutt's modern fexprs, when the syntax can "leak".
+## Comparison with Git file system model
+
+This is close to Git's model, but with one crucial difference:
+Git puts the "permission" info within the directory map's values instead of making it part of the file (blob, in it's parlance) object.
+
+ data GitObject
+ = Blob ByteString
+ | Tree (Map FileName (Persission, FSO))
+
+ data Persission
+ = Directory -- IFF paired with tree
+ -- Iff paired with blob, one of:
+ | RegFile
+ | ExecutableFile
+ | Symlink
+
+So long as the root object is a directory, the representations are isomorphic.
+There is no "wiggle room" the git way since whenever the permission info wouldn't matter (e.g. the child object being mapped to is a directory), the permission info must be a sentinel value.
+
+However, if the root object is a blob, there is loss of fidelity.
+Since the permission info is used to distinguish executable files, non-executable files, and symlinks, but there isn't a "parent" directory of the root to contain that info, these 3 cases cannot be distinguished.
+
+Git's model matches Unix tradition, but Nix's model is more natural.
+
## Machine models
TODO