diff options
Diffstat (limited to 'receivepack/commands.go')
| -rw-r--r-- | receivepack/commands.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/receivepack/commands.go b/receivepack/commands.go new file mode 100644 index 00000000..399a0bf6 --- /dev/null +++ b/receivepack/commands.go @@ -0,0 +1,19 @@ +package receivepack + +import ( + protoreceive "codeberg.org/lindenii/furgit/protocol/v0v1/server/receivepack" + "codeberg.org/lindenii/furgit/receivepack/internal/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 +} |
