On Fri, 23 Nov 2012 20:58:35 -0800 (PST)
kumar <t12...@gmail.com> wrote:
> does git smart http use gzip?
As far as I understand its inner workings, Git's smart HTTP transport
spawns `git upload-pack` on the server and `git receive-pack` on the
client, and then these programs communicate with each other in exactly
the same way they would do if they were run in an SSH session or if you
were using the git:// access protocol.
`git upload-pack` does compress of the loose objects (objects
not in "packs", which are already compressed) before transferring them.
Alternatively, as explained in the manual page , you can make your
webserver to statically serve certain files without even spawning the
Git's HTTP backend program, if needed. If this is configured and used,
whether gzip compression is used depends on the server's *and* client's
configuration (the client tells the server whether it accepts
compressed encodings using a special field in its HTTP request, and
the server is free to consider it or to ignore it). The client's
configuration belongs in the libcURL library Git uses for HTTP[S]
access, and I don't know whether it accepts gzip encoding or not.
You could easily see this yourself by sniffing the HTTP traffic when
doing `git fetch` using a tool like Wireshark or Microsoft Network
Supposedly smart HTTP protocol offers the same fetch performance as
plain git:// protocol, it just has a little overhead of HTTP
negotiation (and authentication, if applies); even on a moderately-sized
repositories this overhead should be negligible.