summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-03-15 17:31:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-15 19:01:09 (GMT)
commitf7e205010542dc9b712473d260058e43ca2b26f7 (patch)
tree503fc2d33b308537fcd04626278476c9ba591614 /Documentation/technical
parent685fbd32916f3e94bc89aa14e8fdce835b06f801 (diff)
downloadgit-f7e205010542dc9b712473d260058e43ca2b26f7.zip
git-f7e205010542dc9b712473d260058e43ca2b26f7.tar.gz
git-f7e205010542dc9b712473d260058e43ca2b26f7.tar.bz2
fetch-pack: support shallow requests
Enable shallow clones and deepen requests using protocol version 2 if the server 'fetch' command supports the 'shallow' feature. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/protocol-v2.txt18
1 files changed, 11 insertions, 7 deletions
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 4f7f251..136179d 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -255,6 +255,10 @@ A `fetch` request can take the following arguments:
to its base by position in pack rather than by an oid. That is,
they can read OBJ_OFS_DELTA (ake type 6) in a packfile.
+If the 'shallow' feature is advertised the following arguments can be
+included in the clients request as well as the potential addition of the
+'shallow-info' section in the server's response as explained below.
+
shallow <oid>
A client must notify the server of all commits for which it only
has shallow copies (meaning that it doesn't have the parents of
@@ -338,13 +342,13 @@ header.
further negotiation is needed.
shallow-info section
- If the client has requested a shallow fetch/clone, a shallow
- client requests a fetch or the server is shallow then the
- server's response may include a shallow-info section. The
- shallow-info section will be included if (due to one of the
- above conditions) the server needs to inform the client of any
- shallow boundaries or adjustments to the clients already
- existing shallow boundaries.
+ * If the client has requested a shallow fetch/clone, a shallow
+ client requests a fetch or the server is shallow then the
+ server's response may include a shallow-info section. The
+ shallow-info section will be included if (due to one of the
+ above conditions) the server needs to inform the client of any
+ shallow boundaries or adjustments to the clients already
+ existing shallow boundaries.
* Always begins with the section header "shallow-info"