You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
archive: optionally use zlib directly for gzip compression
As we already link to the zlib library, we can perform the compression
without even requiring gzip on the host machine.
Note: the `-n` flag that `git archive` passed to `gzip` wants to ensure
that a reproducible file is written, i.e. no filename or mtime will be
recorded in the compressed output. This is already the default for
zlib's `gzopen()` function (if the file name or mtime should be
recorded, the `deflateSetHeader()` function would have to be called
instead).
Note also that the `gzFile` datatype is defined as a pointer in
`zlib.h`, i.e. we can rely on the fact that it can be `NULL`.
At this point, this new mode is hidden behind the pseudo command
`:zlib`: assign this magic string to the `archive.tgz.command` config
setting to enable it.
Signed-off-by: Rohit Ashiwal <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
0 commit comments