blob: d43bee73df5f646ed4d4e64ea2b7176478d00a5d (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package receivepack
import (
protoreceive "codeberg.org/lindenii/furgit/network/protocol/v0v1/server/receivepack"
"codeberg.org/lindenii/furgit/network/receivepack/service"
)
func translateResult(result *service.Result) protoreceive.ReportStatusResult {
out := protoreceive.ReportStatusResult{
UnpackError: result.UnpackError,
Commands: make([]protoreceive.CommandResult, 0, len(result.Commands)),
}
for _, command := range result.Commands {
out.Commands = append(out.Commands, protoreceive.CommandResult{
Name: command.Name,
Error: command.Error,
RefName: command.RefName,
OldID: command.OldID,
NewID: command.NewID,
ForcedUpdate: command.ForcedUpdate,
})
}
return out
}
|