package git-unix
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=925795627e6daae0b4bd16aa506879df11cb201e65fefe38e81378f18d517d4b
sha512=8e407d49808ec26445b0c706f7b010b35050d274b534e265487cb82bcac1f29cd5c41365851d42f84794ddbceb57b90143768a23154117e902b45419d156c410
doc/git-unix/Git_unix/Sync/argument-1-Store/Value/Tree/index.html
Module Value.Tree
type hash = hashtype nonrec entry = hash Git.Tree.entrytype nonrec t = hash Git.Tree.tval entry : name:string -> Git.Tree.perm -> hash -> entryentry ~name perm node is the entry to node with the name name and the mode perm.
v entries ties all entries into one tree object. It does not remove duplicate but re-order the given list such as:
Tree.digest (Tree.v [ { name= a; _ }; { name= b; _ }] ) ;;
- : hash = 8d14531846b95bfa3564b58ccfb7913a034323b8
Tree.digest (Tree.v [ { name= b; _ }; { name= a; _ }] ) ;;
- : hash = 8d14531846b95bfa3564b58ccfb7913a034323b8add entry tree returns a tree containing all elements of tree, plus entry. If entry was already in tree, tree is unchanged.
remove ~name tree returns a tree containing all elements of tree, except one with the name name. If any entries of the given tree don't have the name name, tree is returned unchanged.
val is_empty : t -> boolis_empty tree tests whether the given tree is empty or not.
digest t associates a hash to any value of t. It is guaranteed that if x = y or compare x y = 0, then digest x = digest y.
val hash : t -> inthash blob associates a non-negative integer to any value of t. It is guaranteed that if x = y or compare x y = 0, then hash x = hash y.
Sets and Maps.
val length : t -> int64length tree is the length of the given tree object.