On Tue, Jun 21, 2011 at 09:26:31PM -0400, Jeff King wrote: > It's common to pipe the tar output produce by "git archive" > through gzip or some other compressor. Locally, this can > easily be done by using a shell pipe. When requesting a > remote archive, though, it cannot be done through the > upload-archive interface. > > This patch allows configurable tar filters, so that one > could define a "tar.gz" format that automatically pipes tar > output through gzip. > > Signed-off-by: Jeff King <peff@xxxxxxxx> > --- > This was split across several commits in the previous version of the > series, but due to the cleanups it fits nicely into a single commit. A few comments on what I took and what I didn't: 1. config is now in tar.<filter>.*; this avoids having yet another config section. However, the flat names we give to "git config" look a little silly. E.g., "tar.tar.gz.command". 2. René suggested compressor as the config name. I wanted to stay away from that name, as this really is about generic filtering. I expect most uses will be compressors, but this is also our method for supporting other container formats via external helpers (e.g., you could convert to cpio on the fly). The word "filter" is generic, but it's also a bit redundant. The whole tar.<name> subsection is about the filter. I chose "command", as that is what is used for external diff in userdiff drivers, and it makes it clear that we are running an external helper. I'm lukewarm on it if somebody wants to argue for something else. 3. There's no config to say you want or don't want -<n> compression levels. We always allow them, and it is up to the tool to complain if it doesn't want them. My reasoning is that most everything either takes them already (e.g., gzip, bzip2, xz), or would require a helper script that can either map them (7z) or reject them (whatever helper somebody might write to convert tar2cpio on the fly). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html