aboutsummaryrefslogtreecommitdiff
path: root/receivepack/internal/service/command.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-07 22:38:17 +0800
committerGravatar Runxi Yu2026-03-07 22:38:17 +0800
commit0fb1520c3119ed6aedc5cb25098c0fd0b4cacf90 (patch)
treee02e31a56a4893f9a0397158811e50cae91dc012 /receivepack/internal/service/command.go
parent*: Add some package-level doc comments (diff)
signatureNo signature
*: Package sorting and updates
Diffstat (limited to 'receivepack/internal/service/command.go')
-rw-r--r--receivepack/internal/service/command.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/receivepack/internal/service/command.go b/receivepack/internal/service/command.go
deleted file mode 100644
index 33342e41..00000000
--- a/receivepack/internal/service/command.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package service
-
-import "codeberg.org/lindenii/furgit/objectid"
-
-// 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
-}