In some searches, I've found two slightly different approaches on how to serve a git repository over http.
The first one is using only DAV. The second one uses DAV and git-http-backend.
Is there any difference between the above approaches?
In some searches, I've found two slightly different approaches on how to serve a git repository over http.
The first one is using only DAV. The second one uses DAV and git-http-backend.
Is there any difference between the above approaches?
Yes the first method is very inefficient, which is why the second method was created. When using the old 'dumb' transport method, git can not request specific objects from a server, it can only find out what packfile contains the object it needs and download the entire packfile.
The older 'dumb' transport was also never really intended for pushing changes to the server. It was possible but nobody used it and everybody knew it was bad so it never got much developer attention.
Also if you reexamine the git-http-backend man page that you linked, you'll notice that it does not use DAV. The examples create a backwards compatible setup so that older git clients can still have read access, but only newer clients would have write access. I do not know if it is possible to set it up so that git-http-backend and DAV are used together so that new and old clients can have write access but I would not even recommend attempting it.
The reality is that usage of the old 'dumb' method needs to die off and be replaced by the 'smart' method where ever possible.
For a better explanation of the differences between the 'dumb' and 'smart' transport methods please read this excellent page (complete with pictures!) from the ProGit book author.
http://progit.org/2010/03/04/smart-http.html