aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/advrefs.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/protocol/packp/advrefs.go')
-rw-r--r--plumbing/protocol/packp/advrefs.go41
1 files changed, 24 insertions, 17 deletions
diff --git a/plumbing/protocol/packp/advrefs.go b/plumbing/protocol/packp/advrefs.go
index a0587ab..4e031fb 100644
--- a/plumbing/protocol/packp/advrefs.go
+++ b/plumbing/protocol/packp/advrefs.go
@@ -13,25 +13,32 @@ import (
// AdvRefs values represent the information transmitted on an
// advertised-refs message. Values from this type are not zero-value
// safe, use the New function instead.
-//
-// When using this messages over (smart) HTTP, you have to add a pktline
-// before the whole thing with the following payload:
-//
-// '# service=$servicename" LF
-//
-// Moreover, some (all) git HTTP smart servers will send a flush-pkt
-// just after the first pkt-line.
-//
-// To accomodate both situations, the Prefix field allow you to store
-// any data you want to send before the actual pktlines. It will also
-// be filled up with whatever is found on the line.
type AdvRefs struct {
- Prefix [][]byte // payloads of the prefix
- Head *plumbing.Hash
+ // Prefix stores prefix payloads.
+ //
+ // When using this message over (smart) HTTP, you have to add a pktline
+ // before the whole thing with the following payload:
+ //
+ // '# service=$servicename" LF
+ //
+ // Moreover, some (all) git HTTP smart servers will send a flush-pkt
+ // just after the first pkt-line.
+ //
+ // To accomodate both situations, the Prefix field allow you to store
+ // any data you want to send before the actual pktlines. It will also
+ // be filled up with whatever is found on the line.
+ Prefix [][]byte
+ // Head stores the resolved HEAD reference if present.
+ // This can be present with git-upload-pack, not with git-receive-pack.
+ Head *plumbing.Hash
+ // Capabilities are the capabilities.
Capabilities *capability.List
- References map[string]plumbing.Hash
- Peeled map[string]plumbing.Hash
- Shallows []plumbing.Hash
+ // References are the hash references.
+ References map[string]plumbing.Hash
+ // Peeled are the peeled hash references.
+ Peeled map[string]plumbing.Hash
+ // Shallows are the shallow object ids.
+ Shallows []plumbing.Hash
}
// NewAdvRefs returns a pointer to a new AdvRefs value, ready to be used.