diff options
| author | 2026-03-07 21:21:26 +0800 | |
|---|---|---|
| committer | 2026-03-07 21:21:26 +0800 | |
| commit | 344d0c4d3c968506f5641da40fce581ea5bcdbbc (patch) | |
| tree | b3a03c39dda50cee5154a756a57e4a9d1754d6ae /receivepack/commands.go | |
| parent | receivepack: Add hooks (diff) | |
| signature | No signature | |
receivepack: Re-organize things around
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 +} |
