aboutsummaryrefslogtreecommitdiff
path: root/network/receivepack/commands.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-26 09:14:59 +0000
committerGravatar Runxi Yu2026-03-26 09:14:59 +0000
commit3d25bda9d5da6814661828adabe8a09f9d01aefb (patch)
treed034e28079333f85e5d7b96d921282eddd4798d6 /network/receivepack/commands.go
parentobject/id: Empty tree (diff)
signatureNo signature
network/receivepack: Rename from receivepack
Diffstat (limited to 'network/receivepack/commands.go')
-rw-r--r--network/receivepack/commands.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/network/receivepack/commands.go b/network/receivepack/commands.go
new file mode 100644
index 00000000..a9edec1a
--- /dev/null
+++ b/network/receivepack/commands.go
@@ -0,0 +1,19 @@
+package receivepack
+
+import (
+ protoreceive "codeberg.org/lindenii/furgit/network/protocol/v0v1/server/receivepack"
+ "codeberg.org/lindenii/furgit/network/receivepack/service"
+)
+
+func translateCommands(commands []protoreceive.Command) []service.Command {
+ out := make([]service.Command, 0, len(commands))
+ for _, command := range commands {
+ out = append(out, service.Command{
+ OldID: command.OldID,
+ NewID: command.NewID,
+ Name: command.Name,
+ })
+ }
+
+ return out
+}