author | Junio C Hamano <gitster@pobox.com> | |
Fri, 5 Aug 2011 20:54:06 +0000 (13:54 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 8 Aug 2011 22:33:28 +0000 (15:33 -0700) | ||
commit | 051e4005a37c4ebe8b8855e415e6c6969d68e1a3 | |
tree | f753bdf7fe6931e09d4e54f5a23024b1dc7739df | tree | snapshot |
parent | e9e0643fe64b613b6596b79b59df8ff10746f1a1 | commit | diff |
helping smart-http/stateless-rpc fetch race
A request to fetch from a client over smart HTTP protocol is served in
multiple steps. In the first round, the server side shows the set of refs
it has and their values, and the client picks from them and sends "I want
to fetch the history leading to these commits".
When the server tries to respond to this second request, its refs may have
progressed by a push from elsewhere. By design, we do not allow fetching
objects that are not at the tip of an advertised ref, and the server
rejects such a request. The client needs to try again, which is not ideal
especially for a busy server.
Teach upload-pack (which is the workhorse driven by git-daemon and smart
http server interface) that it is OK for a smart-http client to ask for
commits that are not at the tip of any advertised ref, as long as they are
reachable from advertised refs.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A request to fetch from a client over smart HTTP protocol is served in
multiple steps. In the first round, the server side shows the set of refs
it has and their values, and the client picks from them and sends "I want
to fetch the history leading to these commits".
When the server tries to respond to this second request, its refs may have
progressed by a push from elsewhere. By design, we do not allow fetching
objects that are not at the tip of an advertised ref, and the server
rejects such a request. The client needs to try again, which is not ideal
especially for a busy server.
Teach upload-pack (which is the workhorse driven by git-daemon and smart
http server interface) that it is OK for a smart-http client to ask for
commits that are not at the tip of any advertised ref, as long as they are
reachable from advertised refs.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c | diff | blob | history |