summaryrefslogtreecommitdiff
path: root/Documentation/technical/protocol-v2.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-09-15 18:35:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-15 19:25:19 (GMT)
commit9db5fb4fb352e79931e50f6de71497e273a3a6ac (patch)
treecf0f43d9281a5e8a745de397c936de22df2b054f /Documentation/technical/protocol-v2.txt
parent7f0e4f6ac28b7a9494f3affd1336244d4fb0fe38 (diff)
downloadgit-9db5fb4fb352e79931e50f6de71497e273a3a6ac.zip
git-9db5fb4fb352e79931e50f6de71497e273a3a6ac.tar.gz
git-9db5fb4fb352e79931e50f6de71497e273a3a6ac.tar.bz2
docs/protocol-v2: clarify some ls-refs ref-prefix details
We've never documented the fact that a client can provide multiple ref-prefix capabilities. Let's describe the behavior. We also never discussed the "best effort" nature of the prefixes. The client side of git.git has always treated them this way, filtering the result with local patterns. And indeed any client must do this, because the prefix patterns are not sufficient to express the usual refspecs (and so for "foo" we ask for "refs/heads/foo", "refs/tags/foo", and so on). So this may be considered a change in the spec with respect to client expectations / requirements, but it's mostly codifying existing behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/protocol-v2.txt')
-rw-r--r--Documentation/technical/protocol-v2.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 213538f..9347b2a 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -193,7 +193,11 @@ ls-refs takes in the following arguments:
Show peeled tags.
ref-prefix <prefix>
When specified, only references having a prefix matching one of
- the provided prefixes are displayed.
+ the provided prefixes are displayed. Multiple instances may be
+ given, in which case references matching any prefix will be
+ shown. Note that this is purely for optimization; a server MAY
+ show refs not matching the prefix if it chooses, and clients
+ should filter the result themselves.
If the 'unborn' feature is advertised the following argument can be
included in the client's request.