type source = | From of Hash.t | To notice than an user-defined source exists for the delta-ification. |
| None | To notice than no user-defined source exists. |
The type of a source.
val make : Hash.t -> ?name:string -> ?preferred:bool -> ?delta:source -> Pack.Kind.t -> int64 -> tmake hash ?name ?preferred ?delta kind length returns a new entry when:
hashcorresponds to the unique ID of the git object.namecorresponds to the optional name of the git object. For aTreeor aBlob, the client should notice the given name (to optimize the delta-ification).preferrednotices to the delta-ification algorithm to prefer to use this entry as a source.deltanotices an existing user specified source for the entry (and the delta-ification algorithm will use it).kindcorresponds to the kind of the object.lengthcorresponds to the real inflated length of the object.
val kind : t -> Pack.Kind.tval preferred : t -> boolval length : t -> int64The comparison function for the entry t. It returns 0 when a equal b. It returns a negative integer if a is less than b and a positive integer when a is greater than b. This function is used to sort a list of entries with the Git heuristic and produce an optimal delta-ification.
According to Git, it's a lexicographic sort by the Kind.t, the optional name of the entry (hashed by hash) and sorted by size (larger to smaller).