Skip to main content

pack

Function pack 

Source
pub fn pack(
    root: &Utf8Path,
    rev: &str,
    files: &BTreeSet<String>,
    top: &str,
    epoch: u64,
    archive: &Utf8Path,
) -> Result<(), RkError>
Expand description

Pack files of the revision rev into the gzip tarball archive, under the one top directory top, from the git objects alone.

The archive is reproducible: members sorted by path, no directory entry, each mode from its git mode, owner and group 0 with empty names, every time epoch, and a gzip header with no name and a zero time, so a build of one commit writes the same bytes on every host.

§Errors

git’s failure, or a write that fails.