aboutsummaryrefslogtreecommitdiff
path: root/receivepack/internal/service/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'receivepack/internal/service/command.go')
-rw-r--r--receivepack/internal/service/command.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/receivepack/internal/service/command.go b/receivepack/internal/service/command.go
index f51461ff..33342e41 100644
--- a/receivepack/internal/service/command.go
+++ b/receivepack/internal/service/command.go
@@ -12,8 +12,11 @@ type Command struct {
func fillCommandErrors(result *Result, commands []Command, errText string) {
for _, command := range commands {
result.Commands = append(result.Commands, CommandResult{
- Name: command.Name,
- Error: errText,
+ Name: command.Name,
+ Error: errText,
+ RefName: command.Name,
+ OldID: objectIDPointer(command.OldID),
+ NewID: objectIDPointer(command.NewID),
})
}
}
@@ -21,3 +24,9 @@ func fillCommandErrors(result *Result, commands []Command, errText string) {
func isDelete(command Command) bool {
return command.NewID == objectid.Zero(command.NewID.Algorithm())
}
+
+func objectIDPointer(id objectid.ObjectID) *objectid.ObjectID {
+ out := id
+
+ return &out
+}