aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/technical
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-17 17:21:40 -0800
committerJunio C Hamano <gitster@pobox.com>2021-02-17 17:21:40 -0800
commit69571dfe219f48614e0e0ae7e28efae0be297764 (patch)
tree74213c28659aa3dbcb9ad78a9a6bd946d0c5f6dd /Documentation/technical
parent0871fb9af5aa03a56c42a9257589248624d75eb8 (diff)
parent4f37d45706514a4b3d0259d26f719678a0cf3521 (diff)
downloadgit-69571dfe219f48614e0e0ae7e28efae0be297764.tar.gz
Merge branch 'jt/clone-unborn-head'
"git clone" tries to locally check out the branch pointed at by HEAD of the remote repository after it is done, but the protocol did not convey the information necessary to do so when copying an empty repository. The protocol v2 learned how to do so. * jt/clone-unborn-head: clone: respect remote unborn HEAD connect, transport: encapsulate arg in struct ls-refs: report unborn targets of symrefs
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/protocol-v2.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 85daeb5d9e..f772d90eaf 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -192,11 +192,20 @@ ls-refs takes in the following arguments:
When specified, only references having a prefix matching one of
the provided prefixes are displayed.
+If the 'unborn' feature is advertised the following argument can be
+included in the client's request.
+
+ unborn
+ The server will send information about HEAD even if it is a symref
+ pointing to an unborn branch in the form "unborn HEAD
+ symref-target:<target>".
+
The output of ls-refs is as follows:
output = *ref
flush-pkt
- ref = PKT-LINE(obj-id SP refname *(SP ref-attribute) LF)
+ obj-id-or-unborn = (obj-id | "unborn")
+ ref = PKT-LINE(obj-id-or-unborn SP refname *(SP ref-attribute) LF)
ref-attribute = (symref | peeled)
symref = "symref-target:" symref-target
peeled = "peeled:" obj-id