Re: [PATCH 2/2] archive: avoid spawning `gzip`
- From
Jeff King <peff@peff.net>
- Date
- Apr 15, 2019, 21:36 UTC
- Message-ID
- <20190415213659.GC28128@sigill.intra.peff.net>
- In-Reply-To
- <20190413221646.GL12419@genre.crustytoothpaste.net>
On Sat, Apr 13, 2019 at 10:16:46PM +0000, brian m. carlson wrote:
Show 11 quoted lines
> > The alternative is that we could use a special token like ":zlib" or > > something to indicate that the internal implementation should be used > > (and then tweak the baked-in default, too). That might be less > > surprising for users, but most people would still get the benefit since > > they'd be using the default config. > > I agree that a special value (or NULL, if that's possible) would be > nicer here. That way, if someone does specify a custom gzip, we honor > it, and it serves to document the code better. For example, if someone > symlinked pigz to gzip and used "gzip -cn", then they might not get the > parallelization benefits they expected.
Thanks for spelling that out. I had a vague feeling somebody might be surprised, but I didn't know if people actually did stuff like symlinking pigz to gzip (though it makes perfect sense to do so).
> I'm fine overall with the idea of bringing the compression into the > binary using zlib, provided that we preserve the "-n" behavior > (producing reproducible archives).
I just assumed that gzwrite() would have the "-n" behavior, but it's definitely worth double-checking.
-Peff