aboutsummaryrefslogtreecommitdiff
path: root/protocol/v0v1/server/version.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 14:24:05 +0800
committerGravatar Runxi Yu2026-03-07 17:01:46 +0800
commit4b8d39764f9b54ea3090d0fea92a23025dbea30d (patch)
treecaa6e408c4ea625afcbb1b4aa4fb9e945f46994b /protocol/v0v1/server/version.go
parentrefstore: Split files (diff)
signatureNo signature
protocol: Add v0v1 server protocol and its receivepack subprotocol
Diffstat (limited to 'protocol/v0v1/server/version.go')
-rw-r--r--protocol/v0v1/server/version.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocol/v0v1/server/version.go b/protocol/v0v1/server/version.go
new file mode 100644
index 00000000..23ae9466
--- /dev/null
+++ b/protocol/v0v1/server/version.go
@@ -0,0 +1,12 @@
+package server
+
+// Version identifies the protocol version used on one v0/v1 server session.
+type Version uint8
+
+const (
+ // Version0 is the original protocol framing with no leading version line.
+ Version0 Version = iota
+ // Version1 is protocol v1, which is v0 plus one leading "version 1\n"
+ // pkt-line before ref advertisement.
+ Version1
+)