aboutsummaryrefslogtreecommitdiff
path: root/receivepack/commands.go
blob: 9c38ec73e54172688bc7eaf289c451d4016fa84e (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package receivepack

import (
	protoreceive "codeberg.org/lindenii/furgit/network/protocol/v0v1/server/receivepack"
	"codeberg.org/lindenii/furgit/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
}