fn pack(
head: &Map<String, Value>,
files: &[Value],
patches: bool,
max: usize,
) -> ValueExpand description
Fit the diff under max bytes: patches go first (omitted_patches), then file entries
(their names move to omitted_files); one patch too big for the whole budget is cut.