Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does git protocol produce more objects than git-http-backend?

Tags:

git

I'm using Git 1.7.1 configured with git-http-backend (Smart HTTP). I wanted to see how much faster this was compared to the git:// protocol, since now they are supposed to be on par.

Turns out git:// protocol is compressing more objects (33,229 vs 21,193) for the exact same repo (even verified client side), and thus creating a packfile that's about 30MB bigger for my project.

Is there some reason why git:// protocol needs more objects?

git:// Output

remote: Counting objects: 44510, done.
remote: Compressing objects: 100% (33229/33229), done.
Receiving objects: 100% (44510/44510), 124.07 MiB | 2.84 MiB/s, done.
remote: Total 44510 (delta 22755), reused 15866 (delta 7516)
Resolving deltas: 100% (22755/22755), done.

http:// Output

remote: Counting objects: 24299, done.
remote: Compressing objects: 100% (21931/21931), done.
remote: Total 24299 (delta 7517), reused 0 (delta 0)
Receiving objects: 100% (24299/24299), 95.95 MiB | 2.41 MiB/s, done.
Resolving deltas: 100% (7517/7517), done.
like image 668
occasl Avatar asked Aug 18 '11 21:08

occasl


People also ask

What is Git HTTP backend?

A simple CGI program to serve the contents of a Git repository to Git clients accessing the repository over http:// and https:// protocols. The program supports clients fetching using both the smart HTTP protocol and the backwards-compatible dumb HTTP protocol, as well as clients pushing using the smart HTTP protocol.

Is Git a backend?

Yet, that's exactly what developer Ephi Gabay did with his experimental proof-of-concept GIC: a chat client written in Node. js using Git as its backend database. GIC is by no means intended for production use. It's purely a programming exercise, but it's one that demonstrates the flexibility of open source technology.

What http smart?

So, Smart-HTTP is basically just enabling the new CGI script that is provided with Git called git-http-backend on the server. This CGI will read the path and headers sent by the revamped git fetch and git push binaries who have learned to communicate in a specific way with a smart server.


1 Answers

May be: via git you download files from all branches and you can quickly switch between them, via http you download only master branch.

like image 128
alterpub Avatar answered Oct 17 '22 17:10

alterpub