Thread (21 messages) flat view 21 messages, 6 authors, 2016-06-15

Re: [PATCH 2/2] archive: support gzipped tar files

From: Jeff King <hidden>
Date: 2016-06-15 22:51:28

On Tue, Jun 14, 2011 at 12:25:17PM -0700, J.H. wrote:
On 06/14/2011 11:18 AM, Jeff King wrote:
quoted
git-archive already supports the creation of tar files. For
local cases, one can simply pipe the output to gzip, and
having git-archive do the gzip is a minor convenience.

However, when running git-archive against a remote site,
having the remote side do the compression can save
considerable bandwidth. Service providers could always wrap
git-archive to provide that functionality, but this makes it
much simpler.

Creating gzipped archives is of course more expensive than
regular tar archives; however, the amount of work should be
comparable to that of creating a zip file, which is already
possible. So there should be no new security implications
with respect to creating load on a remote server.
Would it make sense to make this a little more generic and support bz2
and xz as well?
I think it's a great idea if somebody wants to do it on top of my patch.
They should be able to hook into the tar code just like I did in 2/2.
But they will need library support that we don't already have in git.
Doing gz was easy because we already require zlib.

We could also support them by piping to an external compressor, which
wouldn't be too hard (you could do it for gzip, too, but given that we
have zlib, this was much simpler). There is a slight hitch with the
"--list" command, though. Should git-archive advertise these formats,
and if so, how should it know that they are available?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help