diff options
author | David Turner <dturner@twopensource.com> | 2016-04-15 15:19:08 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-18 11:45:59 -0700 |
commit | fa16ec8aaa3247e8bd271b1728f6b59df1649194 (patch) | |
tree | 0d62153b0b4743c09441412a5d96b94e145c30ea /Documentation | |
parent | b403c7fa41d170a00e26a7523435a0bbe7c02f4f (diff) | |
download | git-fa16ec8aaa3247e8bd271b1728f6b59df1649194.tar.gz |
fetch: pass refspec to http server
When fetching over http, send the requested refspec to the server.
The server will then only send refs matching that refspec. It is
permitted for old servers to ignore that parameter, and the client
will automatically handle this.
When the server has many refs, and the client only wants a few, this
can save bandwidth and reduce fetch latency.
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/technical/protocol-capabilities.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt index eaab6b4ac7..8c4a0b90ca 100644 --- a/Documentation/technical/protocol-capabilities.txt +++ b/Documentation/technical/protocol-capabilities.txt @@ -275,3 +275,26 @@ to accept a signed push certificate, and asks the <nonce> to be included in the push certificate. A send-pack client MUST NOT send a push-cert packet unless the receive-pack server advertises this capability. + +interesting-refs +---------------- + +For HTTP(S) servers only: + +Whether or not the upload-pack server advertises this capability, +fetch-pack may send a "refspec" parameter in the query string of a +fetch request. This capability indicates that such a parameter will +be respected, in case the client cares. + +Whenever the receive-pack server gets that parameter, it will not +advertise all refs and will instead only advertise refs that match +those listed in the header. The parameter is a space-separated list of +refs. A ref may optionally contain up to one wildcard. +Advertisements will still respect hideRefs. + +The presence or absence of the "refspec" parameter does not affect +what refs a client is permitted to fetch; this is still controlled in +the normal fashion. + +This saves time in the presence of a large number of refs, because the +client need not wait for the server to send the complete list of refs. |