Junio C Hamano <gitster@xxxxxxxxx> wrote: > But could you be a bit more explicit than application/x-git-refs magic? I > suspect very strongly that clueless server operators would advertise the > type on repositories statically hosted there, and would defeat the point > of your patch. This is a very valid concern. I started to worry about it myself last night, but decided it was late enough and just wanted to start the discussion on the list, extending JH's thread even further. > Perhaps "#" comment line in info/refs that is ignored on the reading side > but update-server-info never generates on its own? This is a good idea. I think anyone who consumes info/refs does so with the understanding that "#" comment lines exist, and should be skipped, but this is not something that has been heavily tested in the wild yet. My concern here goes back to the remark you made above. What if a server owner mirrors a smart server by a non-Git aware device like wget? They will now have a copy of the info/refs content which will suggest we have Git smarts on the backend, but really it isn't there. Perhaps the smart server detection is something like: Smart Server Detection ---------------------- To detect a smart (Git-aware) server a client sends an empty POST request to info/refs; if a 200 OK response is received with the proper content type then the server can be assumed to be Git-aware, and the result contains the current info/refs data for that repository. C: POST /repository.git/info/refs HTTP/1.0 C: Content-Length: 0 S: HTTP/1.0 200 OK S: Content-Type: application/x-git-refs S: S: 95dcfa3633004da0049d3d0fa03f80589cbcaf31 refs/heads/maint Then clients should just attempt this POST first before issuing a GET info/refs. Non Git-aware servers will issue an error code, and the client can retry with a standard GET request, and assume the server isn't a newer style. -- Shawn. -- 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