@@ -76,13 +76,6 @@ struct
76
76
77
77
type entry = string * M .value
78
78
79
- (* Irmin 1.4 uses int8 to store filename lengths.
80
-
81
- Irmin 2 use a variable-size encoding for strings; this is using int8
82
- for strings of size stricly less than 128 (e.g. 2^7) which happen to
83
- be the case for all filenames ever produced by Irmin 1.4. *)
84
- let step_t = Irmin.Type. string
85
-
86
79
let metadata_t =
87
80
let some = " \255\000\000\000\000\000\000\000 " in
88
81
let none = " \000\000\000\000\000\000\000\000 " in
@@ -103,23 +96,15 @@ struct
103
96
let open Irmin.Type in
104
97
record " Tree.entry" (fun _ _ _ -> assert false )
105
98
|+ field " kind" metadata_t metadata_of_entry
106
- |+ field " name" step_t fst
99
+ |+ field " name" string fst
107
100
|+ field " hash" Hash. t hash_of_entry
108
101
|> sealr
109
102
110
103
let entries_t : entry list Irmin.Type.t =
111
104
Irmin.Type. (list ~len: `Int64 entry_t)
112
105
113
106
let pre_hash_entries = Irmin.Type. (unstage (pre_hash entries_t))
114
- let compare_entry (x , _ ) (y , _ ) = String. compare x y
115
- let step_to_string = Irmin.Type. (unstage (to_bin_string Path. step_t))
116
- let str_key (k , v ) = (step_to_string k, v)
117
-
118
- let pre_hash t =
119
- M. list t
120
- |> List. map str_key
121
- |> List. fast_sort compare_entry
122
- |> pre_hash_entries
107
+ let pre_hash t = M. list t |> pre_hash_entries
123
108
end
124
109
125
110
include M
0 commit comments