aboutsummaryrefslogtreecommitdiff
path: root/receivepack/service/command.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-26 09:14:59 +0000
committerGravatar Runxi Yu2026-03-26 09:14:59 +0000
commit3d25bda9d5da6814661828adabe8a09f9d01aefb (patch)
treed034e28079333f85e5d7b96d921282eddd4798d6 /receivepack/service/command.go
parentobject/id: Empty tree (diff)
signatureNo signature
network/receivepack: Rename from receivepack
Diffstat (limited to 'receivepack/service/command.go')
-rw-r--r--receivepack/service/command.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/receivepack/service/command.go b/receivepack/service/command.go
deleted file mode 100644
index 0fd8961e..00000000
--- a/receivepack/service/command.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package service
-
-import objectid "codeberg.org/lindenii/furgit/object/id"
-
-// Command is one protocol-independent requested ref update.
-type Command struct {
- OldID objectid.ObjectID
- NewID objectid.ObjectID
- Name string
-}
-
-func fillCommandErrors(result *Result, commands []Command, errText string) {
- for _, command := range commands {
- result.Commands = append(result.Commands, CommandResult{
- Name: command.Name,
- Error: errText,
- RefName: command.Name,
- OldID: objectIDPointer(command.OldID),
- NewID: objectIDPointer(command.NewID),
- })
- }
-}
-
-func isDelete(command Command) bool {
- return command.NewID == objectid.Zero(command.NewID.Algorithm())
-}
-
-func objectIDPointer(id objectid.ObjectID) *objectid.ObjectID {
- out := id
-
- return &out
-}